Reputation: 14314
Is it possible to create syntax highlighting for custom defined words in known file type?
For example I want to have VS text editor color the tags <@
and @>
a specified color when viewed in a html file.
Can you do this, and if so then how is it possible?
Upvotes: 3
Views: 1947
Reputation: 355
Yes, well, certainly this is possible for C++ files and files that Visual Studio recognises; so if VS is set up to recognise your HTML as C++ files you should be good.
You will need to create a usertype.dat file and place it in your
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
folder (or equivalent for VS2010, this is for VS2008)
This file should have the keywords you want listed separately on each line;
for example; I develop with Qt and I have a usertype.dat file as:
signal
slots
Q_OBJECT
(and so on)
Restart VS and your keywords will be highlighted.
I got the info from here and verified it on my system.
Upvotes: 4