Hi,
The exVim can highlight the specific function, class, struct by add
the function name as keyword in vimfiles/after/syntax/YOUR_LANG.vim,
(in unix/linux is .vim/after/syntax/YOUR_LANG.vim). For example if you
are using cpp, and you know the function/class/struct/enum name you
want to highlight, then go to vimfiles/after/syntax/cpp.vim, then add
the script below:
syn keyword cStatement CLASS_NAME FUNCTION_NAME brarar......
you can create your own color and group by adding syntax script in the
file above. This is the default vim syntax highlight solution. You can
get help in writing syntax script by type :help syntax.
But if your demand is by project-syntax, which means you wish to add
different function/class/... syntax for each project, I have to say
exVim currently not support this feature. Well, if your answer is yes,
I think I could try some way to make it works. But this is not an easy
task, also I'm worry about performance issue. Anyway, give me your
answer first ;)
For local and global variable, I think the difficult thing is how to
detect them by vim. Since vim use vim-script to parse syntax highlight
for different language, there is no general rule to say I wanna to
highlight global variable in this color, and local in other one. Even
if you just focus on one language, let's say c/cpp for example, you
still can't write syntax analysis script for vim to detect them. Base
on these problem or limitation, the only thing can do it is go for
help from cTags, and using it dynamically when open a file, and give
some result for vim to generate script including keywords for these
local / global variable. And one thing I be sure is the performance
will extremely down.
There have a script/plugin in vim web-site named "CTAGS
Highlighting" which may be help you in some way.
You can check it here:
http://www.vim.org/scripts/script.php?script_id=2646
I try to add this plugin in exVim, but finally we decide to make it
an optional for user, because for big project, the analysis time for
this script will be large. The exVim is designed for fast and simple
(not really). So sometimes I have to stop some feature come into exVim
if it leads to performance problem. Syntax Highlight always go to this
situation, since there is no too much way to process it in vim. But I
think it still worth to try the first solution above for by-project
syntax highlight, and I'm looking forward to your answer on it ;)