Thursday Feb 05, 2009

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

About

stuff I get up to :)

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today