GithubHelp home page GithubHelp logo

staytherapy / vim-rst-tables Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nvie/vim-rst-tables

0.0 1.0 0.0 197 KB

Easily create and reformat your RST (reStructuredText) tables as you change cell content.

Python 69.14% Vim Script 30.86%

vim-rst-tables's Introduction

vim-rst-tables

image

Installation

  1. Install the following packages from PyPI:
    • vim_bridge: This is required for the vim plugin scripts, to call directly into Python functions.
  2. Clone the git repository:

    git clone git://github.com/nvie/vim-rst-tables.git
    cd vim-rst-tables
  3. Copy the file ftplugin/rst_tables.vim to your ~/.vim/ftplugin directory

Usage

Creating a new table

  1. Open a reStructuredText file
  2. Create some kind of table outline:

    This is paragraph text *before* the table.
    
    Column 1  Column 2
    Foo  Put two (or more) spaces as a field separator.
    Bar  Even very very long lines like these are fine, as long as you do not put in line endings here.
    Qux  This is the last line.
    
    This is paragraph text *after* the table.
  3. Put your cursor somewhere in the table.
  4. Press ,,c (to create the table). The output will look something like this:

    This is paragraph text *before* the table.
    
    +==========+=========================================================+
    | Column 1 | Column 2                                                |
    +==========+=========================================================+
    | Foo      | Put two (or more) spaces as a field separator.          |
    +----------+---------------------------------------------------------+
    | Bar      | Even very very long lines like these are fine, as long  |
    |          | as you do not put in line endings here.                 |
    +----------+---------------------------------------------------------+
    | Qux      | This is the last line.                                  |
    +----------+---------------------------------------------------------+
    
    This is paragraph text *after* the table.

Re-flowing an existing table

Sometimes, you may have a column that contains enough data that your table is a little hard to work with. To fix that kind of problem, you can define the column width you would prefer, and re-flow your table.

  1. Change the number of "==" signs in the top row of your table to match the column widths you would prefer.
  2. Put your cursor somewhere in the table.
  3. Press ,,f to re-flow the table.

vim-rst-tables's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.