Skip to content

Commit

Permalink
don't set foldmethod=syntax by default
Browse files Browse the repository at this point in the history
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 <rohieb@rohieb.name>
  • Loading branch information
rohieb committed Oct 3, 2017
1 parent 1c3551b commit 5f2f41e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions doc/ledger.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
1 change: 0 additions & 1 deletion ftplugin/ledger.vim
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ let b:undo_ftplugin = "setlocal ".
\ "include< comments< commentstring< omnifunc< formatprg<"

setl foldtext=LedgerFoldText()
setl foldmethod=syntax
setl include=^!\\?include
setl comments=b:;
setl commentstring=;%s
Expand Down

0 comments on commit 5f2f41e

Please sign in to comment.