History Report a problem
Article Edit this page Discussion

Align text into a table

From Vim Tips Wiki

Jump to: navigation, search

[edit] Duplicate tip

This tip is very similar to the following:

These tips need to be merged – see the merge guidelines.

Tip 570 Previous TipNext Tip

Created: September 30, 2003 Complexity: basic Author: mosh Minimum version: 6.0 Karma: 179/46 Imported from: Tip#570


Align badly formatted text into a table by selecting the region, then pressing <A-a>. This case aligns the '='; you decide the centering string before pressing return.

You need the perl script "align" from http://www.cs.albany.edu/~mosh/Perl/align.

Mapping is:

:vmap <A-a> !perl ~/perl/align -c:=

Example input:

" x = 1;
" xyz = 245;
" a=1;

Example output:

" x   = 1;
" xyz = 245;
" a   = 1;

[edit] Comments


Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Pushing Daisies
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Godzilla
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Align text into a table"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation


.