Wednesday, September 22, 2010

nmap'ped commands do not work - but if typed manually

Hi,

This is probably a trivial one...

I have created a new mapping similar to zO, that recursivly opens all
folds even in case the current fold is already open (but some nested
are not). Normal zO does not do anything in this case.

I achieve this by first selecting all of the current fold (jump to
fold end ]z, start visual mode V, jump to fold start [z), and then
applying zO.

This works when typed manually -- regardless if the cursor is inside
an open fold or on a closed fold.

However, if this command sequence is mapped

nmap z<C-O> ]zV[zzO

then it works only inside an open fold, not when the cursor is on a
closed fold.

Felix

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

Post a Comment