Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't set foldmethod=syntax by default #60

Merged
merged 1 commit into from
Oct 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
3 changes: 1 addition & 2 deletions ftplugin/ledger.vim
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ endif
let b:did_ftplugin = 1

let b:undo_ftplugin = "setlocal ".
\ "foldmethod< foldtext< ".
\ "foldtext< ".
\ "include< comments< commentstring< omnifunc< formatprg<"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also remove foldmethod< from b:undo_ftplugin?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL what b:undo_ftplugin does ^^ Thank you, updated.


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