Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Finish braces, brackets and parentheses with ctrl+enter in vim
VimL
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
doc
plugin
README.md

README.md

vim-c-cr

A very simple and small (eighteen lines of vimscript) plugin that maps ctrl+enter (<c-cr>) and ctrl+c (<c-c> for terminal-vim users) in insert mode to finish braces ({}), brackets ([]) and parentheses (()) for you and puts your cursor tabbed over on a blank line between them.

So,

{<c-cr>
or
[<c-cr>
or
(<c-cr>

will give you

{
  <your cursor here>
}
or
[
  <your cursor here>
]
or
(
  <your cursor here>
)

Compatible with pathogen and vundle.

DISCLAIMER

ctrl+enter only works with gvim! Read this stackoverflow question for more info.

Something went wrong with that request. Please try again.