On 14/05/09 07:51, Aman Jain wrote:
>
> Is there a way to save recordings, as I often need to retype all the
> useful recordings(e.g commenting a line) whenever I open a vim
> session.

Well, let's see if I understand you, which isn't certaion since you 
aren't using established Vim terminology. I think tht you are talking 
about (register) _macros_, i.e., series of keystrokes recorded "by doing 
them" by means of the Normal-mode commands qa to qz, but that (key) 
_mappings_ might be more useful to you.

Mappings are sequences of keystrokes assigned to one key or to a 
sequence of keys by means of one of the variations on the |:map| 
command, see |map-overview|. For instance, I have the following in my 
vimrc so that hitting F11 will always move to the next (split) window in 
sequence, and Shift-F11 will go to the previous one:

        :noremap        <F11>   <C-W>w
        :noremap        <S-F11> <C-W>W
        :inoremap       <F11>   <C-O><C-W>w
        :inoremap       <S-F11> <C-O><C-W>W

The difference between mappings and registers is that mappings are 
defined by the ":map" (and family) ex-command, and are often written in 
the vimrc, while qa to qz macros are saved in a register at the moment 
you record them, and registers can be saved from one session to the next 
in the |viminfo| file.

See
        :help map.txt
        :help viminfo
        :help 'viminfo'
        :help complex-repeat
        :help registers


Best regards,
Tony.
-- 
"The four building blocks of the universe are fire, water, gravel and
vinyl."
                -- Dave Barry

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to