summaryrefslogtreecommitdiff
path: root/contrib/vim/ftplugin/ledger.vim
diff options
context:
space:
mode:
authorJohann Klähn <kljohann@gmail.com>2009-06-17 21:48:11 +0200
committerJohann Klähn <kljohann@gmail.com>2009-06-17 21:48:11 +0200
commit7654ecc102f6889cafc69b3060cbb7d9ca81ef01 (patch)
treec9e8fcc41c26df9f46fa6419e6afe475efb37b14 /contrib/vim/ftplugin/ledger.vim
parent9701548f7e634f9a19295e34f624264343b78f0b (diff)
downloadfork-ledger-7654ecc102f6889cafc69b3060cbb7d9ca81ef01.tar.gz
fork-ledger-7654ecc102f6889cafc69b3060cbb7d9ca81ef01.tar.bz2
fork-ledger-7654ecc102f6889cafc69b3060cbb7d9ca81ef01.zip
vim: complete account names with compl-keyword
Basic support for keyword completion (<C-X> <C-N>) Will only work on account names with no spaces
Diffstat (limited to 'contrib/vim/ftplugin/ledger.vim')
-rw-r--r--contrib/vim/ftplugin/ledger.vim6
1 files changed, 5 insertions, 1 deletions
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.