On Mon, August 27, 2012 22:16, Dan wrote:
> Steps:
> Put the following in your vimrc
> nnoremap z J
> autocmd BufWinLeave *.* mkview
> autocmd BufWinEnter *.* silent loadview
>
> In the commandline:
> vim ~/foo
>
> Insert this text:
> Test1
> Test1
>
> Test2
> Test2
>
> Fold the Test1 lines in one fold (enter visual mode, select them, then
> press zf)
>
> Save and exit.
>
> Open the file with vim again and observe how the file has changed to:
> Test1Test1
>
> Test2
> Test2
>
> If you open the view for that file (in ~/.vim/views/ by default), you will
> see there is a command:
> normal zc
>
> mkview should use normal! not normal for folding commands, otherwise
> mappings in the vimrc could be used (some folding operations seem to be
> done with normal!, but some aren't).

Good catch.
I found another point, where mkview uses normal instead of normal!
and it is fixes with the attached patch.

regards,
Christian

-- 
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

Attachment: mkview.diff
Description: Binary data

Raspunde prin e-mail lui