question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

question

José Cruz
I have some text separated by ',' with a header and a body with the same
format, like this:

col1, col2, col3
12765123, some text, 0987098

I have 3 columns but they are not column aligned with the header, or the
header are not column aligned with de body... the bigger defines the
witdh...

is it possibly in VIM to handle this situation like ultraedit does?

col1,           col2,         col3
12765123, some text, 0987098

thanks,
Jos? Cruz

Reply | Threaded
Open this post in threaded view
|

Re: question

Tim Chase-2
 > I have 3 columns but they are not column aligned with the
 > header, or the header are not column aligned with de
 > body... the bigger defines the witdh...
 >
 > is it possibly in VIM to handle this situation like
 > ultraedit does?
 >
 > col1,           col2,         col3
 > 12765123, some text, 0987098

You might try Dr. Chip's "align.vim" script
http://www.vim.org/scripts/script.php?script_id=294

or the more simple "lineup.vim" at
http://www.vim.org/scripts/script.php?script_id=176

(though the second one suggests that you just use the first
one ;)

-tim







Reply | Threaded
Open this post in threaded view
|

Re: question

Charles E Campbell Jr
In reply to this post by José Cruz
Jos? Cruz wrote:

> I have some text separated by ',' with a header and a body with the
> same format, like this:
>
> col1, col2, col3
> 12765123, some text, 0987098
>
> I have 3 columns but they are not column aligned with the header, or
> the header are not column aligned with de body... the bigger defines
> the witdh...
>
> is it possibly in VIM to handle this situation like ultraedit does?
>
> col1,           col2,         col3
> 12765123, some text, 0987098


Hello!

My align plugin will do this -- see
http://vim.sourceforge.net/scripts/script.php?script_id=294.
You can do this depending on exactly what you want with

  :[range]Align ,
  (select)\t,
  (select)\ts,
  (select)\T,

Regards,
Chip Campbell