Giter VIP home page Giter VIP logo

tabbi's Introduction

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

A simple vim plugin that aligns text separated with tabs or two or more whitespaces, so that each part starts in the same column as in the other lines. Similar as a table, but without lines.

Before:
part one        part two     part three
 another part one              another part two    another part three

After:
part one                  part two                 part three
another part one    another part two   another part three

Usage: to align the whole buffer, type :Tabbi, for aligning parts type e.g. :10,20Tabbi or use visual mode.



With the function Tabb(<pattern> [<trim> [,<separator]]) it is possible to format the selected lines.
<pattern> is the pattern after which the lines should be formatted, §x or §x-y is replaced by the corresponding column. §- can be used to align the lines like the :Tabbi command.
<trim> is a boolean specifying if the parts are trimmed (default 0).
<sep> is a string or regular expression that specifies the string separating the line into columns. The default is tabs or two or more whitespaces.
See the plugin file for more details.

Before:
part one, part two  ,part three , part four, rest
one  , two , three

-> select the lines and type :call Tabb("§2: §1§-§3-4", 1, ",")

Result:
part two: part one  - part three , part four
two: one                  - three

tabbi's People

Stargazers

 avatar

Watchers

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