From 7654ecc102f6889cafc69b3060cbb7d9ca81ef01 Mon Sep 17 00:00:00 2001 From: Johann Klähn Date: Wed, 17 Jun 2009 21:48:11 +0200 Subject: vim: complete account names with compl-keyword Basic support for keyword completion ( ) Will only work on account names with no spaces --- contrib/vim/ftplugin/ledger.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'contrib/vim/ftplugin/ledger.vim') diff --git a/contrib/vim/ftplugin/ledger.vim b/contrib/vim/ftplugin/ledger.vim index cef0d81e..8cbc3fac 100644 --- a/contrib/vim/ftplugin/ledger.vim +++ b/contrib/vim/ftplugin/ledger.vim @@ -12,7 +12,7 @@ let b:did_ftplugin = 1 let b:undo_ftplugin = "setlocal ". \ "foldmethod< foldtext< ". - \ "include< comments< " + \ "include< comments< iskeyword< " " don't fill fold lines --> cleaner look setl fillchars="fold: " @@ -20,6 +20,10 @@ setl foldtext=LedgerFoldText() setl foldmethod=syntax setl include=^!include setl comments=b:; +" so you can use C-X C-N completion on accounts +" FIXME: Does not work with something like: +" Assets:Accountname with Spaces +setl iskeyword+=: " You can set a maximal number of columns the fold text (excluding amount) " will use by overriding g:ledger_maxwidth in your .vimrc. -- cgit v1.2.3