Monday, October 31, 2011

Re: How to edit partly folded text without it going Sproing! ?

On 30.10.11 17:07, Paul wrote:
> " 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

Ooooh yes, many thanks Paul. (And Ben, for the link.)

That does the trick, just Vimderfully!

Erik

--
My grandmother currently runs ubuntu. This was not my doing, but she managed
to wipe her windows and install it accidentally when someone handed her the
live CD to deal with a windows problem she was having. The computer asked
her to do things. So she did. - Seen on luv-main, in slightly longer form.

--
You received this message from the "vim_use" 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

No comments: