How do I create columated data with VIM?

How do I create columated data with VIM?

I'd like to take a series of variable width lines

foo
bar
foobarbazquz
foobar

And append another column,

foo                asdf
bar                asdf
foobarbazquz       asdf
foobar             asdf

Does VIM provide any shortcuts to make this easier?

答案1

There will probably be other good suggestions, but the one that you will want to look into immediately is the 'virtualedit' option. See:

:help 'virtualedit'

You probably want to just do:

:set virtualedit=all

相关内容