On Jun 8, 8:59 pm, Peter Odding <[email protected]> wrote:
> > A seemingly simple workaround would be to disable all automatic text
> > folding while the completion menu is visible. Is this easy to implement
> > in Vim and do others agree this is a more sensible thing to do?
>
> To clarify: By disable I meant "temporarily ignore changes to folding",
> not "unfold all text and then start the completion" because that would
> get very annoying very quickly :-)
>
How about temporily ignoring changes to folding until you leave insert
mode?
" Don't screw up folds when inserting text that might affect
them, until
" leaving insert mode. Foldmethod is local to the window.
Protect against
" screwing up folding when switching between windows.
autocmd InsertEnter * if !exists('w:last_fdm') | let
w:last_fdm=&foldmethod | setlocal foldmethod=manual | endif
autocmd InsertLeave,WinLeave * if exists('w:last_fdm') | let
&l:foldmethod=w:last_fdm | unlet w:last_fdm | endif
This doesn't work for some patch levels in Vim 7.2...I don't recall
the exact patch number that makes it work again.
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php