Friday, September 30, 2011

replace e flag works in command but fails if that command in key mapping

The e option in

:s/\<[a-z]/\u&/ge

duly suppresses the error message if used as a command, but fails when used
in the following key mapping in .vimrc

" Type ;c to ConcatenateTitles and accumulate them in register z
:map ;c :s/\<[a-z]/\u&/ge<CR>:s/[ ,.;:'"]//ge<CR>"Zyy

producing "E486: Pattern not found: \<[a-z]" and failing to complete the
command string

Why different?

--
View this message in context: http://vim.1045645.n5.nabble.com/replace-e-flag-works-in-command-but-fails-if-that-command-in-key-mapping-tp4858038p4858038.html
Sent from the Vim - General mailing list archive at Nabble.com.

--
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

No comments: