Skip to content

Latest commit

 

History

History
32 lines (29 loc) · 688 Bytes

README.md

File metadata and controls

32 lines (29 loc) · 688 Bytes

vim-c-cr

A very simple and small (33 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, plug and vundle.

DISCLAIMER

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