From c2384b60465ac48ac9bdd77871c611ebeeb7795b Mon Sep 17 00:00:00 2001 From: Johann Klähn Date: Mon, 13 Sep 2010 13:09:17 +0200 Subject: vim. fix highlighting of comments at end of line --- contrib/vim/syntax/ledger.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'contrib/vim') diff --git a/contrib/vim/syntax/ledger.vim b/contrib/vim/syntax/ledger.vim index acd17bca..70473232 100644 --- a/contrib/vim/syntax/ledger.vim +++ b/contrib/vim/syntax/ledger.vim @@ -38,7 +38,8 @@ syn match ledgerPosting /^\s\+[^[:blank:];][^;]*\ze\%($\|;\)/ syn match ledgerAccount /^\s\+\zs\%(\S \S\|\S\)\+\ze\%( \|\t\|\s*$\)/ contained syn match ledgerComment /^;.*$/ -syn region ledgerMetadata start=/;/ skip=/^\s\+;/ end=/^/ +" comments at eol must be preceeded by at least 2 spaces / 1 tab +syn region ledgerMetadata start=/\%( \|\t\|^\s\+\);/ skip=/^\s\+;/ end=/^/ \ keepend contained contains=ledgerTag syn match ledgerTag /:[^:]\+:/hs=s+1,he=e-1 contained syn match ledgerTag /\%(\%(;\|^tag\)[^:]\+\)\@<=[^:]\+\ze:[^:]\+$/ contained -- cgit v1.2.3