Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.
Close

#53 Save macros

closed-fixed
nobody
None
5
2010-02-02
2009-08-07
No

Hi,
Is there a way to persist macros? I'm aware that there is no .vimrc and a solution to this isn't trivial but it could be of great help.

There's a Macros tab in the Editor Options and i tried with vi-append vi-escape.

Found this kind of commands in an old document u've uploaded to jvi's homepage and it didn't work. It was listed in bugs section :)

Thx u're doing a great work!
Francisco Ortiz Peñaloza

Discussion

  • Ernie Rael

    Ernie Rael - 2009-08-07

    > ability to persist macros ... let @a='^i<li><C-[>$i</li>'

    I don't really use macros much, I had to look up the "@" command. I'm glad to hear it still works. I gues that the "let @a=..." initialized a named buffer? I've never used it.

    Here's considerations on ways to get what you are looking for

    1 - vim saves the contents of the named buffers for the next
    restart in .viminfo. It might be easy to persist this.

    2 - In the jVi options, there could be a table of 26 entries,
    @a, @b, @c,..., which when set would be used to initialize
    the associated named buffer.

    If both were implemented, 2 should supercede 1.

    Would one of these satisfy your needs? Would you want both?

     
  • Francisco Ortiz Penaloza

    You're right you could use "let @a=" on your .vimrc to save a macro.

    And yes, vim also keep macros saved between sessions on .viminfo. To be specific it saves all named not empty buffers on it.

    Having on .viminfo it would really work for me i'm not using more than five macros at best as i need keep track of them :)

    Plus i like the idea of .viminfo cause it's transparent to the user, keeping options menu simpler

    thx!
    Francisco Ortiz Peñaloza

     
  • Ernie Rael

    Ernie Rael - 2009-12-10
    • status: open --> open-fixed
     
  • Ernie Rael

    Ernie Rael - 2009-12-10

    In CVS. named buffers/registers are persisted between sessions.

     
  • Ernie Rael

    Ernie Rael - 2010-02-02
    • status: open-fixed --> closed-fixed
     
  • Ernie Rael

    Ernie Rael - 2010-02-02

    available in 1.2.7 release

     

Log in to post a comment.