is it possible and if "true"

yes. :)

 then
      how()

Well, by default, vim supports saving the contents of registers via the viminfo file/settings

        :help 'viminfo'

Since macros are recorded to registers, this would save any macros you have, up to a given size (either in lines or in bytes, depending on the setting of 'viminfo').

It's often handy, if you have an action that you want to repeat, to store it in a mapping instead. You can paste the "source" of your macro just as you would paste any other register:

        "ap

(assuming you recorded to register "a") which should give you a pretty good indicator of what should be done in the mapping.

You don't detail the particulars of your macro, so I can't offer suggestions on making a mapping. however, if it's something common that you want to do regularly, you can then put the mapping in your vimrc file and it will be available every time you start vim.

-tim




Reply via email to