Hi Muddassirali :) * Muddassirali Mirzani <[EMAIL PROTECTED]> dixit: > I'd like to write a simple syntax file for a file > type that is a transcript( contains only printed > messages from a simulation) . > I wanted to do the following : > e.g. a) Search for string [TRACE] and colour the whole > line in yellow > b) Search for string [WARNING] and colour the > whole line in green.. and so on...
If the lines are *exactly* as you say, you can do with commands like these: syntax match Trace "^.*\[TRACE\].*$" hi Trace ctermfg=yellow In the last one, you will probably use guifg instead of ctermfg. > Are there any examples scripts out there.. Any > help/pointers appreciated.. You can see the whole lot of syntax files provided with vim, and the help: ":help hi" and ":help syntax". The help is very good and detailed, with examples. Fortunately, you needs are very simple and easy to do. If you encounter any problem doing the syntax, you can post here a more or less detailed explanation of the syntax and I'll try to write the syntax file for you. Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen!