I use GVim and Visual Studio for coding. One of the most missing features in VS compared to GVim is the ability to highlight multiple words in different colors at the same time. See this screenshot of a GVim session for example (wResult and fBufferLocked are marked)
In GVim, I often use this function to get an overview of where this variable is used.
I did not find a plugin that provides this feature for VS. I know the solutions that a single (!) Keyword can highlight, but not several and of different colors. Therefore, I plan to write a plug-in for VS 2008 that implements this function (unless someone now gives a link to a ready-made plug-in that does what I miss so much ;-))
Well, the problem is that I have no experience writing plugins for VS 2008 (or any other VS). And before starting to study what a VS architecture plugin is, I would like to get some feedback from you on whether such a plugin is possible and what efforts it consists in its implementation.
The idea is as follows:
If the user presses a specific key combination in the VS code editor, VS syntax highlighting is added below the cursor. Say this is word 1 with background color 1. All the keywords "word 1" are highlighted now.
If the user moves the cursor over another word and presses the shortcut key, this word will also be added to the syntax highlighting, but with a different background color. Say this is word 2 with background color 2.
If the cursor is over the already selected word, and the user presses the shortcut key, then this word is removed from the syntax highlighting.
Thus, basically the plugin should add keywords to the current syntax highlighting and delete them on demand.
My questions:
Is there one approach to this with syntax highlighting and a plug-in, or are there (better, easier) alternatives?
Does this approach work at all? Or, to put it another way:
2.1. Is it possible to extend syntax highlighting (e.g. C ++) while VS is running?
2.2. If a keyword is added / removed to / from syntax highlighting at runtime, when does VS update the editor view? Automatically when you change the backlight, it is necessary and can turn on a plug-in trigger to update the editor's view or restart VS (the last one would be a knockout for this idea)?
Is there an open source VS 2008 plugin that does something with syntax highlighting, marking code, or something similar that I could use as a starting point for learning? A good starting point on MSDN is this and rightnow when entering this. I found a plugin that at least deals with syntax highlighting .
Thank you in advance for your comments ...
Greetings
Xabi
source share