Tuesday, January 29, 2013

Re: Windows ALT characters

On Wed, 30 Jan 2013 12:53:20 +1100 John McGlynn
<johnmmcglynn@gmail.com> wrote:

> Hi Vim,
>
> I have a load of csv files in which some rows have an arrow at the
> end. The arrow seems to have been made using Windows ALT 26.
>
> It shows up in Vim as ^Z^M.
>
> Can anyone tell me how to remove these pesky objects?

I think you mean "control" rather than ALT. You have several ways to
do it. Assuming "l" isn't in your 'cpoptions' (":set cpoptions-=l"
if it is), you can use

:%s/[\x1a]//g

to remove them. Alternatively, you can enter it by prefixing it with
control-V, so you can type

colon
percent
ess
slash
control+v
control+z
slash
slash
gee

to produce what appears as

:%s/^Z//g

Hope this helps,

-tim


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: