Vim Tips Wiki
m (Fixed formatting)
m (Added duplicate flag and set category)
Line 1: Line 1:
 
{{review}}
 
{{review}}
  +
{{Duplicate|893|139|894}}
 
{{Tip
 
{{Tip
 
|id=570
 
|id=570
Line 51: Line 52:
 
== Comments ==
 
== Comments ==
 
<!-- parsed by vimtips.py in 0.448814 seconds-->
 
<!-- parsed by vimtips.py in 0.448814 seconds-->
  +
[[Category:Usage]]

Revision as of 21:20, 18 September 2007

Duplicate tip

This tip is very similar to the following:

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

Previous TipNext Tip

Tip: #570 - Align text into a table

Created: September 30, 2003 20:10 Complexity: basic Author: mosh--AT--cs.albany.edu Version: 6.0 Karma: 179/46 Imported from: Tip#570

What: Aligns badly formatted text into a table.

How: Select region and press <A-a>, in 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. Inspired by Emacs align.el. Works on Windows and Unix.


Default key 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; 


I know not what; but format in apparel, In gait and countenance surely like a father. -- BIONDELLO in Taming of Shrew by Shakespeare.

Comments