Tuesday, February 25, 2014

How to edit a macro?

Dear Vim experts,

after recording a macro I realized that I forgot to specify the
register I yanked into.

The macro in register q was

/^[^#].*<-.*GO:\d\{7\}^My/)^M

and matches lines like the following line 1
1 light <- c( 'GO:1234567',
2 'GO:7162635', 'GO:4536271',
3 'GO:7654321' )

the macro yanks everything up to, and including, line 3.

The problem is, that I want to specify the register the content is yanked to.
So I tried

:let @q='/^[^#].*<-.*GO:\d\{7\}^M"Gy/)^M'

But the ^M form a problem. The macro is not executed correctly.

Does anyone know how to solve this?

Cheers!

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment