About: Smarter Table Editing II   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

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 the 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. 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.

AttributesValues
rdfs:label
  • Smarter Table Editing II
rdfs:comment
  • 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 the 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. 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.
Version
  • 5(xsd:double)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 552(xsd:integer)
Author
  • Usman Latif
Complexity
  • basic
Created
  • 2003-09-10(xsd:date)
ID
  • 554(xsd:integer)
NEXT
  • 555(xsd:integer)
Rating
  • 2(xsd:integer)
abstract
  • 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 the 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. To better illustrate the functionality of the script, I have created the table below: ==================================================================== This table illustrates the use of table.vim script ==================================================================== th marks a line as table heading and activates maps for and keys th must be invoked on a well formed line with the right number of columns This means that the above line does not qualify Also notice that the field separator is atleast two spaces -------------------------------------------------------------------- when the maps are active, pressing here <-- moves here here <-- moves here <== moves back to "<==" <** here moves to "<**" above -------------------------------------------------------------------- The maps for and work in insert and normal modes, and can be deactivated by pressing tt pressing tt again, re-enables the maps -------------------------------------------------------------------- The script has some very basic support for field alignment It is very easy to get out of alignment when editing ta on the line above will fix the line to: It is very easy to get out of alignment when editing -------------------------------------------------------------------- ta can be very handy if the user wants to expand or contract fields, just change the width of the fields on the heading line and press th to mark the new heading and then numta on the top line of the table. num is the number of lines in the table -------------------------------------------------------------------- The alignment command fails when a row has more fields than the heading or when the contents of a field don't fit inside the field, as specified by the heading row case1 is this row case2 is this row ... ... this is another example of case2, there is no space for field separator on the first field on above line ==================================================================== If you don't like the default mappings change them to whatever you like. The mappings are defined on top of the table.vim script file. 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 The script can also be downloaded from
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software