From 04f564f01c9395188c1bc0d890745ad15eb3fc2f Mon Sep 17 00:00:00 2001 From: Johann Klähn Date: Tue, 7 Sep 2010 17:59:26 +0200 Subject: 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 --- contrib/vim/compiler/ledger.vim | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'contrib/vim/compiler/ledger.vim') 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 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 -- cgit v1.2.3