Giter Club home page Giter Club logo

textformcomplete's Introduction

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

DESCRIPTION
This plugin can transform textual options (in the form FOO|BAR, as they are
often found in templates or snippets) into a printed list or insert-mode
completion, which offer all alternatives ("FOO" and "BAR" in this example),
and allow to choose one and replace the full options block with it.

USAGE
q|                      List all individual alternatives in the text form
                        close to the cursor and allow the user to choose one,
                        which then replaces the full options block.
{Visual}q|              List all individual alternatives in the selected text
{Select}CTRL-X |        form and allow the user to choose one, which then
                        replaces the selection.
[count]q|               Replace the full options block / selection with the
{Visual}[count]q|       [count]'th alternative from it.

CTRL-X |                Convert the text form before the cursor into the
                        individual alternatives and offer them for completion.

SYNTAX
The text forms can be in simple and extended syntax. The simple syntax is just
a list of word characters (without whitespace!), delimited by | characters:
    FOO|BAZ|QUUX
You can include [], (), + and |, too, but you have to escape with a backslash.

The extended syntax is bracketed by [...], and its alternatives can contain
whitespace and any other characters.
    [FOO+BAR|My BAZ|The QUUX!]
Additionally, you can append an optional explanation to each alternative. This
will only be shown in the completion menu, but is not inserted into the
buffer. The explanation must be enclosed in (...) and comes after the
alternative text, separated by a <Space>:
    [FOO (default)|BAZ (softer)|QUUX (the special choice)]

Another form element is a slider where the active element # can be positioned
anywhere on the linear measure ----- between the [...] stops.
    [---#------]
You can choose among all possible positions (indicated with their percentage
ranges), and after that quickly adjust with CTRL-A / CTRL-X.

textformcomplete's People

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.