summaryrefslogtreecommitdiff
path: root/contrib/vim
diff options
context:
space:
mode:
authorJohann Klähn <kljohann@gmail.com>2010-09-13 13:09:17 +0200
committerJohann Klähn <kljohann@gmail.com>2010-09-13 13:09:17 +0200
commitc2384b60465ac48ac9bdd77871c611ebeeb7795b (patch)
treeb6a8f6d0ebe1e32c4bb23475198a599b299da15c /contrib/vim
parent0f81c67c29446edca76de30ab8193815c0613fc2 (diff)
downloadfork-ledger-c2384b60465ac48ac9bdd77871c611ebeeb7795b.tar.gz
fork-ledger-c2384b60465ac48ac9bdd77871c611ebeeb7795b.tar.bz2
fork-ledger-c2384b60465ac48ac9bdd77871c611ebeeb7795b.zip
vim. fix highlighting of comments at end of line
Diffstat (limited to 'contrib/vim')
-rw-r--r--contrib/vim/syntax/ledger.vim3
1 files changed, 2 insertions, 1 deletions
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