Skip to content

Commit a7fdd47

Browse files
committed
don't set foldmethod=syntax by default
Overwriting the user's modeline is probably a bad idea. Instead make a hint in the documentation and let the users set it themselves. Fixes #31 Signed-off-by: Roland Hieber <[email protected]>
1 parent 1c3551b commit a7fdd47

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

doc/ledger.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ TIPS *ledger-tips*
3030

3131
Tips and useful commands
3232

33+
* vim-ledger can do syntax-sensitive folding when you set `foldmethod=syntax`
34+
in the |modeline| of your ledger file. This way transactions can shrink down
35+
to just one line.
36+
3337
* Try account-completion (as explained below). If you use YouCompleteMe, you
3438
should disable it for Ledger files. Put this in your .vimrc:
3539

ftplugin/ledger.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ endif
1010
let b:did_ftplugin = 1
1111

1212
let b:undo_ftplugin = "setlocal ".
13-
\ "foldmethod< foldtext< ".
13+
\ "foldtext< ".
1414
\ "include< comments< commentstring< omnifunc< formatprg<"
1515

1616
setl foldtext=LedgerFoldText()
17-
setl foldmethod=syntax
1817
setl include=^!\\?include
1918
setl comments=b:;
2019
setl commentstring=;%s

0 commit comments

Comments
 (0)