solvedbiscuit71 / vim-autopair

The simplest implementation of auto completing quotes and brackets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vim-autopair

The simplest implementation of auto completing quotes and brackets.

Installation

  • Vim-Plug
    Plug 'solvedbiscuit71/vim-autopair'
  • Packer
    use 'solvedbiscuit71/vim-autopair'
  • Use other plugin manager

Usage

The current content, where | is the cursor

foo|

Press the ( key,

foo(|)

Now, pressing the ) key will skip it.

foo()|

Now, press the { key and press <CR> key

foo(){
    |
}

Now, press " key the content becomes

foo(){
    "|"
}

Now, pressing the <BS> will remove the pairs

foo(){
    |
}

Support for html tags

This plugin also supports auto closing tags for html which only in HTML files.

  • > triggers auto closing
  • / triggers auto closing as single tag i.e <br/>

About

The simplest implementation of auto completing quotes and brackets


Languages

Language:Vim Script 100.0%