I'm messing around with vim one liners, and I'm unable to escape a . character in a vim ex mode append command.
Basically,
vim -En '+a|Hello World' '+p' '+q!' -
prints "Hello World"
But,
vim -En '+a|.' '+p' '+q!' -
prints nothing at all. The . on a line by itself ends the append command, so I can't print it.
This unfortunately means I can't write a vim -E command script allowing me to chain commands. I want something like this, where the first vim call constructs the Ex commands, and the second interprets them
vim -En '+a|aConvoluted Hello World
.
Qp
QZQ
' | vim -En
But the first call fails: everything from the . on is ignored.
Any way to escape the dot? (It's a bit of a code golf, so it's all got to be vim only)
Golf rules for those who are interested:
No characters from the set b,c,d,e,f,k,p,r,s,t,{,},$,&,;,/,:,@,#,,,(,),<,>,! All uppercase characters are allowed.
\.
?