sponsor Vim development Vim logo Vim Book Ad

vim-c-cr : Finish braces, brackets and parentheses with ctrl+enter in gvim

 script karma  Rating 1/1, Downloaded by 739  Comments, bugs, improvements  Vim wiki

created by
John Krueger
 
script type
ftplugin
 
description
Full plugin located at: https://github.com/jtmkrueger/vim-c-cr

vim-c-cr
A very simple and small (eighteen lines of vimscript) plugin that maps ctrl+enter (<c-cr>) 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>
)

DISCLAIMER

This only works with gvim!
 
install details
Compatible with pathogen and vundle, here's the github repo where you can find the whole plugin: https://github.com/jtmkrueger/vim-c-cr.

Only the 1 file is here.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
ccr.vim 1 2013-06-04 7.0 John Krueger Initial upload
ip used for rating: 3.17.183.24

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github