Tabs in vi substitute string?

Tabs in vi substitute string?

Post by Pete Holsber » Sat, 12 Apr 2003 09:39:45



I want to use tabs (\t\t) in the "substitute" part of a vi
search &b substitute command, but vi substitutes \t
literally.

:%s/:/\t\t/g

Is there a way to do this?

If not, what tool can I use to do this?

Thanks.
--
Pete Holsberg -- Columbus, NJ 08022
NOTE: To get email address, remove "nospam."

 
 
 

Tabs in vi substitute string?

Post by Tim Hayne » Sat, 12 Apr 2003 18:08:42



> I want to use tabs (\t\t) in the "substitute" part of a vi search &b
> substitute command, but vi substitutes \t literally.

> :%s/:/\t\t/g

> Is there a way to do this?

What's wrong with pushing the TAB key when you want a tab symbol?

At a push, you might need to Ctrl-v before pushing it, to ensure literal
quote in the command string, but mostly it Just Works around here.

~Tim
--

Another apt-get dist-upgrade                |http://spodzone.org.uk/