vimvim-macros

edit a Vim macro with a range operation that refers to a tag


I created a macro with a range (http://vim.wikia.com/wiki/Ranges) operation like:

:.,'bs/ .*$\n/ /ge^M

I then wanted to edit it, which I would normally do using let (http://vim.wikia.com/wiki/Macros#Editing_a_macro):

:let @b=':.,'bs/ .*$\n/ /ge^Mdd'

But for these examples, the ' in the macro definition causes the edit to fail. How to resolve this? Either an alternate range syntax or a way to escape the quote when defining.

I know I can re-record the macro, but the actual version is much longer than this!


Solution