Sunday, 14 November 2010

Highlighting CDA comments in VIM

I spend the larger part of my day collating outputs from customer systems (be they crash dumps, LDOM outputs, messages, etc.) and adding notes where appropriate. For example I might dump a vnode structure in mdb and want to draw particular attention to a specific member of that structure

Most CDAs I've read through use !! or <-- to draw attention to notes, or distinguish notes from output. I've followed this pattern and find it very useful day to day... but this can be improved As a (g)vim user I added the following to my .vimrc file:

highlight CDANote ctermbg=red
match CDANote /<--.*$/ highlight CDANote2 ctermbg=red 2match CDANote2 /!!.*$/


And an obligatory screenshot:


Almost certainly there are better ways to achieve the same, but for day-to-day use, this makes reading notes and comments a great deal easier

No comments:

Post a Comment