>>Soooo
>>      :s/^V^C/\r/             <-- ctl-V ctl-C is shorter,
>>                                  else the "\%x03" will work fine
>>should do what you want.

>Thanks very much.  Yes that is what I needed.  And the text I'm 
>playing with came from some serial data and has STX ETX wrapping the 
>real data.  I was getting rid of the STX and trying to convert the 
>ETX to end of line.

No worries.  Eg, if you wanted to do everything in one shot, could do
something like

        :g/\(^V^B\)\(.*\)\(^V^C\)/s//"\2"\r/

to bracket the text in quotes, get rid of the ^B/^C, *and* add the
newline at the end.

If more'n one occurrences happen in a line, then you could probably
prefix it with "\{-}" for non-greedy (ie, minimal) matching, and trail
the command with a 'g' to do it multiply on each line if needed.


>And since I'm on a windows machine, Yakov suggested ^Q instead of ^V. 

Only if you got 'mswin.vim', which I killed off in a hurry before I even
heard everyone's advice here to trash it.  :D

That's so you can use things like ^C/^X/^V (copy/cut/paste) and the ^V
would trash the literal prefix for a character.  As well as lobotomise
'vim' to do windowsy things, which is generally something you *don't*
want.  Kinda like putting a slushbox in a Ferrari...


>Molon Labe...

Yeh, "Come and *take* it...".

Love the story...

Reply via email to