Color syntax for local variables and user defined functions.
I have enabled syntax coloring with gvim and it works fine with 'c' keywords like 'if', 'else' etc.
However it does not work with a function or local variable defined by me. I have built 'tags' file again after modifying my files to no avail. What shud I do to enable color syntax for local variables, user defined functions etc.
Thanks in advance.
Here is a look at my .vimrc
"filetype plugin on
" VIM Configuration File
" Description: Optimized for C/C++ development, but useful also for other things.
" Author: Shailesh
" set UTF-8 encoding
" disable vi compatibility (emulation of old bugs)
" use indentation of previous line
" use intelligent indentation for C
" configure tabwidth and insert spaces instead of tabs
set tabstop=4 " tab width is 4 spaces
set shiftwidth=4 " indent also with 4 spaces
set expandtab " expand tabs to spaces
" wrap lines at 120 chars. 80 is somewaht antiquated with nowadays displays.
" turn syntax highlighting on
" turn line numbers on
" highlight matching braces
" intelligent comments
set comments=sl:/*,mb:\ *,elx:\ */
" Keyboard mappings
map <F1> :previous<CR> " map F1 to open previous buffer
map <F2> :next<CR> " map F2 to open next buffer
" Install OmniCppComplete like described on http://vim.wikia.com/wiki/C++_code_completion " This offers intelligent C++ completion when typing '.' '->' or <C-o> " Load standard tag files
Re: Color syntax for local variables and user defined functions.
On May 4, 10:16 am, shailesh_d <[hidden email]> wrote:
> I have enabled syntax coloring with gvim and it works fine with 'c' keywords
> like 'if', 'else' etc.
> However it does not work with a function or local variable defined by me. I
> have built 'tags' file again after modifying my files to no avail. What shud
> I do to enable color syntax for local variables, user defined functions etc.
The built-in C syntax highlighting does not highlight your own
variables, etc. regardless of whether or not you have run Ctags.
For that, you will need an additional plugin. I think I remember
reading a post about "tag cloud" or something like that which will do
what you want. Search www.vim.org for a plugin or filetype plugin for
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php