[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] vi -- replace char with newline
- Subject: [ale] vi -- replace char with newline
- From: esoteric at denali.atlnet.com (Wandered Inn)
- Date: Thu, 05 Jul 2001 10:47:15 -0400
This worked for me:
:s/:/: \\^M/
You get the ^M by depressing and holding the ctrl-V and then the 'm'
Cade Thacker wrote:
>
> How do you search/replace for the newline character in vi/vim. very simple
> problem, I have a classpath
>
> export CLASSPATH=classes.zip:cade.jar:bubba.jar:hello.jar
>
> i want to make it
>
> export CLASSPATH=classes.zip:\
> cade.jar:\
> bubba.jar:\
> hello.jar
>
> So I want to search for all ':' and replace them with ':\<newline>' so I
> try
>
> :%s/:/:\\\n/g
>
> this does not work,
>
> can sombody tell me how to search for special characters (ie tabs,
> newlines, etc)
>
> Thanks.
>
> --cade
>
> "Burn your tv in your yard, and gather round it with your friends,
> and warm your hands upon the fire and start again" --Toad the Wet Sprocket
> --------------------------------------------------------------------------
>
> --
> To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
--
Until later: Geoffrey esoteric at denali.atlnet.com
"Great spirits have always found violent opposition from mediocre minds.
The latter cannot understand it when a man does not thoughtlessly submit
to hereditary prejudices but honestly and courageously uses his
intelligence." - Albert Einstein
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.