Thursday, October 7, 2010

Executing commands over a fold

I'm really excited about the possibility about running a command over
a set of folds. What this would mean is that I could store a command,
then rather than trying to run it 10 times, see that I have a few more
lines to execute, run it again, hoping that I don't go too far,
instead I could fold the lines I want to execute the command over,
then only execute the command over what's folded. In fact I was so
excited, I started to add this to one of the wikia pages on folding.
But then I was slightly disappointed to see that the "command" that
folddoc expected didn't like my escape sequences.
Could you help me determine what's wrong?
Store the keysequence into a buffer:
qa^i ^[ (escape key)
Set the mark with ma, and go to the line I want to start the fold.
Make the fold to the mark that I've set
zf'a
Now, the part that doesn't work:
:folddoc <ctrl+r>a

Any help would greatly be appreciated.

Thanks,
Ven

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