====== Vim Tricks ====== ===== Saving Macros with Escape and Control-Characters ===== Example in .vimrc let @e='02f{lyt}:!makeex ^R"^M:tabe ex/^R"/^R"-sol.tex^M:vsplit ex/^R"/^R".tex^M' The problem is, ^R () and ^M () are single special characters. You have to enter them bei preceeding them with . Or simply paste them in Insert-Mode with C-r C-r q (provided the macro is stored in register q) Record your macro q and then show it with :reg q. Replace all [[http://vimdoc.sourceforge.net/htmldoc/intro.html#key-notation|special chars]].