On Monday, January 27, 2014 10:13:35 PM UTC+13, BPJ wrote:

> Why the backslash before <cr>?

Because...
> Will <cr> without it be replaced
> by ^M in a doublequoted string?

No.  I suppose \r would be shorter, but in vim when to use \r or \n is 
confusing.

> Where in the :help is that?

:help expr-quote
 
> And if so why not a singlequoted string here anyway?

one can use single-quotes, and type a ^M by pressing ctrl-V first, but for the 
purposes of a group post, confusion can result when various web browsers and 
mail clients mangle the non-printing character.  Using "\<cr>" avoids that and 
also is plain to human readers what is intended.  In fact no quotes are needed, 
and the execute is not needed, I just tried

    :g//normal v//e^M$"Ay

where ^M appears I typed Control-V and pressed enter.  Simpler, though, to give 
a command that readers can copy and paste.

Regards, John Little
    


-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to