X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=csv.vim;fp=csv.vim;h=baa0ea25a4499fa82d95fdd6fa67cac4c6691435;hb=07317be27a3d6c654cb7f0b858d750b916cbe7c8;hp=0000000000000000000000000000000000000000;hpb=56991d13eddaa96d11eabc9ed0baa83be3bc0ba0;p=vim-syntax.git diff --git a/csv.vim b/csv.vim new file mode 100644 index 0000000..baa0ea2 --- /dev/null +++ b/csv.vim @@ -0,0 +1,13 @@ +highlight csv1 ctermfg=darkred +highlight csv2 ctermfg=green +highlight csv3 ctermfg=blue +highlight csv4 ctermfg=yellow +highlight csv5 ctermfg=cyan +highlight csv6 ctermfg=white + +syn match csv1 /^[^,]*/ nextgroup=csv2 +syn match csv2 /,[^,]*/hs=s+1 contained nextgroup=csv3 +syn match csv3 /,[^,]*/hs=s+1 contained nextgroup=csv4 +syn match csv4 /,[^,]*/hs=s+1 contained nextgroup=csv5 +syn match csv5 /,[^,]*/hs=s+1 contained nextgroup=csv6 +syn match csv6 /,[^,]*/hs=s+1 contained nextgroup=csv2