Re: C++ Syntax highlighting for Identifier, Statement
This might be possible using a tags file, which already gathers all the class, variable, function, etc names (and their locations). Maybe a command (or autocommand) to create syntax objects based on a tags file would do the trick? I don't know how to do this, but maybe someone else on the list can suggest a way. -Dmitriy On 1/14/07, Andy Wokula [EMAIL PROTECTED] wrote: Matt England schrieb: I'm trying to get function names, class names, objects, variables and similar things to appear as non-white text with 'syntax on'. Had the same question after editing with Visual Studio. This is difficult, I haven't seen that before in any syntax file. I think there are no means to do that in an easy way. The file (and included files) needs to be parsed to collect all the user defined names. I think with some energy it should be possible, because syntax definitions can be added and removed at any time. Hopefully some of the gurus will answer? Andy -- EOF ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Re: C++ Syntax highlighting for Identifier, Statement
Matt England wrote: I'm trying to get function names, class names, objects, variables and similar things to appear as non-white text with 'syntax on'. I thus far have been unsuccessful. I can get many other constructs (constants, types, keywords, etc) to be highlighted, but not the things mentioned above. I've been trying putting different flavors of: http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/index-c.html in my .vimrc with no luck. I've also been trying to change the Identifier and Statement gizmos in these settings with no luck. (I'd like to know how these gizmos map to languages like .cpp...but finding the round trip info seems rather challenging.) I've also messed around with the syntax/syncolor.vim file a bit, but still no luck. Where does 'cterm' apply and 'guifg' apply and on and on... I've designed a lot of different software systems in a variety of languages, but I'm not sure I've seen anything quite as broad as the settings/things in vim programming. It's rather overwhelming to me at the moment. Thanks for any help, -Matt Dispersed Storage: http://cleversafe.org Syntax highlighting should work out of the box without the need to add coloring statements in the vimrc. However, it works only if activated: 1) Vim must be compiled with +autocmd (i.e. has(autocmd) must have a nonzero value, usually 1). This means a Normal, Big or Huge build. 2) Filetype detection and syntax highlighting must be enabled in the vimrc: -- Method I (recommended) runtime vimrc_example.vim Place the above near the top of your vimrc, after :set nocompatible and/or a :language command if you use them, but before anything else. -- Method II filetype plugin on syntax on Once colouring works (i.e. once various parts of your editfiles are displayed in various colours), if you want to _change_ the colours, the canonical way to do it is via a colorscheme (see :help :colorscheme). A number of colorschemes are distributed with Vim, some more are available as scripts on the vim-online site http://vim.sourceforge.net/ -- and of course it is possible to write one's own. Best regards, Tony.
Re: C++ Syntax highlighting for Identifier, Statement
Matt England schrieb: I'm trying to get function names, class names, objects, variables and similar things to appear as non-white text with 'syntax on'. Had the same question after editing with Visual Studio. This is difficult, I haven't seen that before in any syntax file. I think there are no means to do that in an easy way. The file (and included files) needs to be parsed to collect all the user defined names. I think with some energy it should be possible, because syntax definitions can be added and removed at any time. Hopefully some of the gurus will answer? Andy -- EOF ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
C++ Syntax highlighting for Identifier, Statement
I'm trying to get function names, class names, objects, variables and similar things to appear as non-white text with 'syntax on'. I thus far have been unsuccessful. I can get many other constructs (constants, types, keywords, etc) to be highlighted, but not the things mentioned above. I've been trying putting different flavors of: http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/index-c.html in my .vimrc with no luck. I've also been trying to change the Identifier and Statement gizmos in these settings with no luck. (I'd like to know how these gizmos map to languages like .cpp...but finding the round trip info seems rather challenging.) I've also messed around with the syntax/syncolor.vim file a bit, but still no luck. Where does 'cterm' apply and 'guifg' apply and on and on... I've designed a lot of different software systems in a variety of languages, but I'm not sure I've seen anything quite as broad as the settings/things in vim programming. It's rather overwhelming to me at the moment. Thanks for any help, -Matt Dispersed Storage: http://cleversafe.org