Search code examples
macrosvimvi

Is there a way to display a macro list similar to displaying your mappings in Vim?


I know there is a way to list mappings via :map (or :imap, :cmap, etc.), but I can't find a way to list macros I have stored in my vimrc file (as in let @a = 'blahblah').

Is there a way to do this without having to manually looking inside it (via :split [myvimrcfile] or whatever way)?

Also, if it is possible, is there a way to attach some sort of documentation that would display with the macro to explain what it is for? I have a handful that I use quite a bit, but about 6 weeks apart. It would be nice to just quickly list them along with a comment that tells me what the macro does (or even just a name so I make sure I use the right one).

Thanks


Solution

  • In vim, the macros are just stored in registers. You can recall the content of any register and execute it as a macro (which is what the @ does). To see a list of what is in your registers, use :reg.