Thank you thank you thank you!
for a line of:
a b c
(tab character is in-between letters)
a command of:
s/ /\n/g
yields:
anbnc
However
for the line:
a b c
(tab character is in-between letters)
a command of:
s/ /^v^m/g
(the ^v doesn't appear as Cliff pointed out)
yields:
a
b
c
which is what I want! Cliff is correct.
Thank you!!
Me, too. Windows 10 can't open the ,hlp file. Does anyone know how to express a NL (new line) in a regular expression in this vi? Usually I would do this:
:g/\//s//\NL/g
(with NL hitting the return)
That would change all '/' into new lines.
Useful after a:
$ find . -type f -a -print > filelist.lxt
Anyone?
And, I'm clearly confused. \n is the match for a newline. If you want to put a newline into the substitution, use CTRL-V, then CTRL-M.
The CTRL-V isn't visible, but tells the editor to accept the next character as a character, not to interpret it. The final command will look like:
:g/\/s//^M/g
Cliff,
Thank you thank you thank you!
for a line of:
a b c
(tab character is in-between letters)
a command of:
s/ /\n/g
yields:
anbnc
However
for the line:
a b c
(tab character is in-between letters)
a command of:
s/ /^v^m/g
(the ^v doesn't appear as Cliff pointed out)
yields:
a
b
c
which is what I want! Cliff is correct.
Thank you!!
for a line of:
a b c
(tab character is in-between letters)
a command of:
s/ /\n/g
yields:
anbnc
However
for the line:
a b c
(tab character is in-between letters)
a command of:
s/ /^v^m/g
(the ^v doesn't appear as Cliff pointed out)
yields:
a
b
c
which is what I want! Cliff is correct.
Thank you!!
:g/\//s//\NL/g
(with NL hitting the return)
That would change all '/' into new lines.
Useful after a:
$ find . -type f -a -print > filelist.lxt
Anyone?
New line should just be \n.
So, your command should read:
:g/\//s//\n/g
The CTRL-V isn't visible, but tells the editor to accept the next character as a character, not to interpret it. The final command will look like:
:g/\/s//^M/g
Thank you thank you thank you!
for a line of:
a b c
(tab character is in-between letters)
a command of:
s/ /\n/g
yields:
anbnc
However
for the line:
a b c
(tab character is in-between letters)
a command of:
s/ /^v^m/g
(the ^v doesn't appear as Cliff pointed out)
yields:
a
b
c
which is what I want! Cliff is correct.
Thank you!!