sponsor Vim development Vim logo Vim Book Ad

table.vim : smarter table editing/navigation

 script karma  Rating 24/11, Downloaded by 1880    Comments, bugs, improvements  Vim wiki

created by
usman latif
 
script type
utility
 
description
In vimtip#547 I described some functions that enable easier navigation
and editing of tables. I have considerably enhanced the functionality
and placed all the relevant code in a script file.

The idea of the script is to automatically extract fields from a table
row and use that information to create maps that aid in editing and
navigation of the table. The user first marks a table row as table
heading. The line does not literally have to be the table heading, but
it should be representative of the typical row of the table in
question.

After this step the script maps tab and shift-tab keys to move between
fields. These mappings work in both insert and normal modes. The tab
mapping is especially useful in insert mode as it inserts the correct
amount of padding to reach the start of the next field.

The script also has an alignment feature that aligns the fields of the
row with that of the heading. Editing a pre-existing table frequently
leads to misaligned rows and this feature alleviates the need to
manually add/remove padding.

For more details about the script check the documentation in the script package. I also intend to post a tip documenting the use of the script. The tip will most likely be numbered vimtip #554
 
install details
To install the script, place table.vim in the vim macros directory
and source it in your vimrc using:
source $VIMRUNTIME/macros/table.vim

If you simply want to check the functionality of the script, place
the script file in your current directory, open vim in the same
directory and use
:so table.vim
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
table.zip 0.1 2003-09-10 6.0 usman latif Initial upload
ip used for rating: 54.81.163.254

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo