summaryrefslogtreecommitdiff
path: root/contrib/vim/compiler
diff options
context:
space:
mode:
authorJohann Klähn <kljohann@gmail.com>2010-09-07 17:59:26 +0200
committerJohann Klähn <kljohann@gmail.com>2010-09-07 17:59:26 +0200
commit04f564f01c9395188c1bc0d890745ad15eb3fc2f (patch)
tree4accc863739469907ecff4717cbec469be0aab48 /contrib/vim/compiler
parent0570c9c416a3cdad9c312a392300413d979696ac (diff)
downloadfork-ledger-04f564f01c9395188c1bc0d890745ad15eb3fc2f.tar.gz
fork-ledger-04f564f01c9395188c1bc0d890745ad15eb3fc2f.tar.bz2
fork-ledger-04f564f01c9395188c1bc0d890745ad15eb3fc2f.zip
vim. use ledger print as 'formatprg'
You can now try to select some lines using V (visual mode) and have them automatically formatted using gq
Diffstat (limited to 'contrib/vim/compiler')
-rw-r--r--contrib/vim/compiler/ledger.vim8
1 files changed, 2 insertions, 6 deletions
diff --git a/contrib/vim/compiler/ledger.vim b/contrib/vim/compiler/ledger.vim
index b6bb7fb4..e9e98a8e 100644
--- a/contrib/vim/compiler/ledger.vim
+++ b/contrib/vim/compiler/ledger.vim
@@ -12,13 +12,9 @@ if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif
+" default value will be set in ftplugin
if ! exists("g:ledger_bin") || empty(g:ledger_bin) || ! executable(split(g:ledger_bin, '\s')[0])
- if executable('ledger')
- let g:ledger_bin = 'ledger'
- else
- echoerr "ledger command not found. Set g:ledger_bin or extend $PATH."
- finish
- endif
+ finish
endif
" %-G throws away blank lines, everything else is assumed to be part of a