vim. fix highlighting of accounts

fixes such situations: "baz:foo a foo:baz"
This commit is contained in:
Vladimir Parfinenko 2011-02-27 15:44:29 +06:00
parent 021fc50842
commit da341726c2

View file

@ -35,7 +35,7 @@ syn match ledgerPosting /^\s\+[^[:blank:];][^;]*\ze\%($\|;\)/
\ contained transparent contains=ledgerAccount,ledgerMetadata
" every space in an account name shall be surrounded by two non-spaces
" every account name ends with a tab, two spaces or the end of the line
syn match ledgerAccount /^\s\+\zs\%(\S \S\|\S\)\+\ze\%( \|\t\|\s*$\)/ contained
syn match ledgerAccount /^\s\+\zs\%(\S\@<= \S\|\S\)\+\ze\%( \|\t\|\s*$\)/ contained
syn match ledgerComment /^;.*$/
" comments at eol must be preceeded by at least 2 spaces / 1 tab