tpenguinltg / vim-closing-brackets

A dead-simple Vim plugin to automatically insert closing brackets

Home Page:http://www.vim.org/scripts/script.php?script_id=5397

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Closing Brackets

A dead-simple Vim plugin to automatically insert the closing bracket/brace/parenthesis based on Vim Tip #630. Requires Vim 7.0 or higher.

This plugin was written because the other solutions interfered with SCIM and were more complex than I needed.

Installation

Place the contents of this repo in your Vim runtime folder (~/.vim on *nix systems or %USERPROFILE%\vimfiles on Windows) or use your favorite Vim plugin manager.

Mappings

The following are insert-mode mappings provided by this plugin. ( may be replaced with [ or {. The cursor position is denoted by |.

Start Input Result
( (|)
() (|)
(<BS>
<C-v>( (|
(<Del> (|
|) ) )|
)| ) ))|
<C-v>) )|

There is additionally an extra mapping for {<CR>:

{
|
}

The opened line will be indented according to your settings.

This plugin does not attempt to autoinsert quotes or do any smart deletion of pairs.

License

As a collection of commands based on content from the Vim Tips wiki, this plugin is licensed under the Creative Commons Attribution-Share Alike License 3.0 (Unported) (CC-BY-SA).

Alternatives

The tip page has a list of plugins that offer more advanced functionality.

About

A dead-simple Vim plugin to automatically insert closing brackets

http://www.vim.org/scripts/script.php?script_id=5397


Languages

Language:Vim Script 100.0%