-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Delete part of document when folded on save #39
Comments
Sorry but I can't find |
I've already mentioned it:
http://www.vim.org/scripts/script.php?script_id=158 |
I reproduce that, it should be a bug. I'll try to fix it. Thanks for your report, any PR or idea is graceful. |
vim-markdown-toc/ftplugin/markdown.vim Line 359 in 98dccae
did this. ref https://www.linux.com/learn/vim-tips-folding-fun
Do your have any good ideas? |
I suppose simulating normal editing flow should solve this. I.e. what we do if we want to delete old TOC and replace it with new one manually, and TOC is currently hidden inside some fold? Move cursor to that fold, unfold it with |
This plugin still has this issue... and it fucked up all my code ☠️! |
Looks like if TOC is inside folded block then whole block is deleted while auto-updating TOC on save and TOC is added few lines below deleted block. For example (require foldutil plugin), starting from document:
Doing
:w
makes no change, but after:FoldMatching ^# -1
next:w
will change document to:The text was updated successfully, but these errors were encountered: