diff --git a/doc/ledger.txt b/doc/ledger.txt index 9299b1f..917e398 100644 --- a/doc/ledger.txt +++ b/doc/ledger.txt @@ -30,6 +30,10 @@ TIPS *ledger-tips* Tips and useful commands +* vim-ledger can do syntax-sensitive folding when you set `foldmethod=syntax` + in the |modeline| of your ledger file. This way transactions can shrink down + to just one line. + * Try account-completion (as explained below). If you use YouCompleteMe, you should disable it for Ledger files. Put this in your .vimrc: diff --git a/ftplugin/ledger.vim b/ftplugin/ledger.vim index 257916d..d0648be 100644 --- a/ftplugin/ledger.vim +++ b/ftplugin/ledger.vim @@ -10,11 +10,10 @@ endif let b:did_ftplugin = 1 let b:undo_ftplugin = "setlocal ". - \ "foldmethod< foldtext< ". + \ "foldtext< ". \ "include< comments< commentstring< omnifunc< formatprg<" setl foldtext=LedgerFoldText() -setl foldmethod=syntax setl include=^!\\?include setl comments=b:; setl commentstring=;%s