Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search and replace syntax in vi

Status
Not open for further replies.

tradntele

Programmer
Nov 7, 2001
14
US
I have a text file with spaces. In vi, I want to search and replace the spaces with a tab character... what is the correct syntax? I tried the following in command mode, which just replaced the spaces with a "t".

:%s/ /\t/g
 
Instead of typing \t just hit the tab key.

Hope this helps. CaKiwi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top