On 2014-04-27 09:35, Jeri Raye wrote: > E486: pattern not found : \c\<\(<C-R>0\)\> > > Any idea why pattern isn't found?
It seems to be thinking that the <C-R> is a literal, not a
command to insert a register.
You can try the following, all done as Ex commands rather than
normal-mode commands:
:sview data.txt
:%y a
:let @/='\<\('.substitute(substitute(@a,'\n','\\|','g'), '..$',
'', '').'\)\>\c'
:q
:%s//\u&/g
This should
1) split "data.txt" in a new window
2) yank the whole thing into register "a"
3) make your search register become the transformation of the content
in register-a into the desired search query (wrapped in "\<...\>")
4) close the data.txt window
5) perform the substitution across your entire file, replacing the
first letter with its uppercase variant
-tim
signature.asc
Description: PGP signature
