Giter Club home page Giter Club logo

auto-pairs.kak's Introduction

auto-pairs.kak

Auto-paired characters for Kakoune.

When inserting an opening pair, auto-pairs always inserts the closing pair, unless when under a word character or preceded by a backslash, and for non nestable characters (such as apostrophes), when preceded by word characters.

Auto-pairing is also about pair navigation and editing (deleting existing pairs and formatting in pair). It can move in pair (▌), delete in pair (▌) and post pair ()▌, and pad in pair horizontally (␣▌␣) and vertically:

    …
    foobar {
        ▌
    }
    …

.

When inserting an auto-paired character, if the opening and closing characters are the same (such as double quote strings), auto-pairs will move right in pair "▌" and skip additional pairing post pair "▌.

Features

  • Auto-pairing
  • Vertical and horizontal padding
  • No sh call when typing

Dependencies

Installation

Add auto-pairs.kak to your autoload or source it manually.

require-module auto-pairs

Usage

Enable auto-pairs with auto-pairs-enable. Auto-paired characters can be changed via the auto_pairs option.

Surrounding pairs

By default, auto_pairs includes the following surrounding pairs:

Parenthesis block: ( )
Braces block: { }
Brackets block: [ ]
Double quote string: " "
Single quote string: ' '
Grave quote string: ` `
Double quotation mark: “ ”
Single quotation mark: ‘ ’
Double angle quotation mark: « »
Single angle quotation mark: ‹ ›

See also surround.kak and manual-indent.kak.

auto-pairs.kak's People

Contributors

alexherbo2 avatar johnisom avatar maximbaz avatar mogenson avatar

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.