From 3a679a695da865a78a401e5fc6166a91082cd004 Mon Sep 17 00:00:00 2001 From: Johann Klähn Date: Sun, 12 Sep 2010 14:18:06 +0200 Subject: vim. avoid misinterpretion of 1 char words --- contrib/vim/ftplugin/ledger.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/vim/ftplugin/ledger.vim b/contrib/vim/ftplugin/ledger.vim index a50a5510..77df4b09 100644 --- a/contrib/vim/ftplugin/ledger.vim +++ b/contrib/vim/ftplugin/ledger.vim @@ -367,7 +367,7 @@ function! s:transaction.from_lnum(lnum) dict "{{{2 let trans['date'] = part elseif ! has_key(trans, 'code') && part =~ '^([^)]*)$' let trans['code'] = part[1:-2] - elseif ! has_key(trans, 'state') && part =~ '^.$' + elseif ! has_key(trans, 'state') && part =~ '^[[:punct:]]$' " the first character by itself is assumed to be the state of the transaction. let trans['state'] = part else -- cgit v1.2.3