Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a list of columns in vim:

, column_foobar
, column_really_way_to_long
, column_prefixfoo_prefixbar_really way to long

I want these to become padded and joined such that it looks something like this

, foo     ,  bar    ,  baz    ,  quz_quadazzel
, foobar  ,  moono  ,  bleh   ,  bleh  

Is there an easy sequence of commands that I can do for this? In addition, I'd like to know how to pad a visual block to a specific amount of characters.

, baz
, z
, really_long_column_of_stuff

I.e, how can I right pad to make all of the columns length(' , really_long_column_of_stuff')

share|improve this question
I'd write a function to do that and make it act on a range – Daenyth Jul 16 '10 at 20:53
When you use placeholders 'foo', 'bar', etc., make sure you keep the same placeholders in subsequent examples so it is clear how you want them to be processed. That's what placeholders are for. Right now, it seems like you want to change words as well or something, and I can't easily say how you want to transform the original expression. I'm just saying this so you can make it easier for people to help you, and thus get more answers. – Daniel Andersson Mar 8 '12 at 12:49
lol, get real.. – Evan Carroll Mar 8 '12 at 14:53

If you are on Linux, this neat little trick will work:

%!column -t
share|improve this answer

Have a look at the Align plugin. Here are some examples of its capabilities.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .