On Oct 8, 9:50 am, Ben Fritz <[email protected]> wrote: > > 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. > > You're trying to execute a normal-mode command where an :ex command is > expected. What you are trying to do is: > > :folddocnormal! '<C-R>a' >
(where <C-R> means "type CTRL and R keys together") > However, may I instead suggest: > > 1. Visually select the lines you wish to execute the command on (or > use marks as you are doing) > 2. :'<,'>normal! '<C-R>a' > (again, where <C-R> means "type CTRL and R keys together", and I do have a typo, you should omit the quotes around the whole ending) > Note that if you press : in visual mode, the '<,'> automatically gets > inserted on the line. This means, "do the command :normal! on every > line in the visual selection". Actually, it occurred to me, the BEST way is probably to dispense with the <C-R> altogether: :'<,'>normal! @a -- 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
