Friday, January 20, 2012

Re: Inserting ',' without changing anything else...

On Sat, Jan 21, 2012 at 08:05:56AM +0100, meino.cramer@gmx.de wrote:
> With vim I want to edit a table, which unfortunately has "no
> format"...
>
> To make this table machine readable I need to insert ","s at
> certain and known positions at each line.
>
> Since the table is LONG I am looking for a fast way to do this.
> A macro works technically but is too slow.

I'm not sure what you're after. A mapping comes to mind

:nmap <F2> i,<esc>

but that's manually and slow to.

Would this help you?:

:%s/\%42c/,/

That would insert a comma on each line at column 42 (see :h /\%c)

Happy Vimming,
flori

--
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

No comments: