NOTICE use jiangmiao/auto-pairs.git instead.
A vim plugin that, based on the cursors surroundings, can open a line between the delimiters that the plugin has been configured with.
For instance:
function hello(param) {|}
becomes:
function hello(param) {
|
}
when you press enter.
The plugin has the following default delimiters baked in:
["{}", "[]", "()"]
You can change the delimiters like so:
let g:vebdDelimiters = ["{}", "[]", "()", "**"]
Add the following in you .vimrc
to get it working for all file types:
inoremap <CR> <C-R>=vebd#vimEnterBetweenDelimiters()<CR>
or alternatively, for only some filetypes:
autocmd FileType javascript,css inoremap <CR> <C-R>=vedb#vimEnterBetweenDelimiters()<CR>