Skip to content

zetyang/RST-Tables

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

This is a modification of the standard RST-Table vim plugin plus following features:
    
    1. fix column width containing Chinese characters
    2. add simple tables(table without headers) command: ,,C and ,,F

-------------------------------------------------------------

This is a mirror of http://www.vim.org/scripts/script.php?script_id=3041

This plugin allows to create and edit restructuredText tables easily.

Its adds two new commands:

    ,,c  ->  Creates a new restructuredText table.
    ,,f  ->  Fix table columns in a table.

For example, if you have a paragraph with data like this:

    nombre      apellido    edad
    pepe        zarate      28
    toto        garcia      29

you can press ",,c" to create a simple table:

    +--------+----------+------+
    | nombre | apellido | edad |
    +========+==========+======+
    | pepe   | zarate   | 28   |
    +--------+----------+------+
    | toto   | garcia   | 29   |
    +--------+----------+------+


Now, if you change the table content, for example adding characters
to the first content row.

    +--------+----------+------+
    | nombre | apellido | edad |
    +========+==========+======+
    | Un nombre muy largo que rompe la tabla   | zarate   | 28   |
    +--------+----------+------+
    | toto   | un appellido largo...   | 29   |
    +--------+----------+------+

you need to fix the columns widths. So, press ",,f" and you will gets:

    +----------------------------------------+-----------------------+------+
    | nombre                                 | apellido              | edad |
    +========================================+=======================+======+
    | Un nombre muy largo que rompe la tabla | zarate                | 28   |
    +----------------------------------------+-----------------------+------+
    | toto                                   | un appellido largo... | 29   |
    +----------------------------------------+-----------------------+------+

About

Allows to create and edit restructuredText tables easily

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vim Script 100.0%