In Source Insight, global variable show up in a different colour. Is there a way to accomplish this in vi (or any other free editor)?
It may not be quite what you want, but you could have a look at my CTagsHighlighting plugin for Vim.
Assuming your chosen language is supported by it (or at least by ctags: it's quite easy to add new languages), this plugin will use ctags to parse your source tree and identify a lot of extra keyword types (including global variables, which will be highlighted in the
To do this the editor would need to be context aware (ie understand the syntax of the language) this requires the editor to be integrated with the compiler.
So though vim can do syntax highlighting of a very complex nature. This type of functionality is beyond it (well knowing how vim can be hacked I am sure somebody will now come and show how it is done, but it will not be trivial).
Vim's syntax highlighting falls into three categories:
About the only editor that is probably capable of this (and I am not sure it is). Is the one built into "Visual Studio 2010" (Though some emacs guru is going to come and say otherwise).