icetimux

Home | Snippets | Archive

Vim remap for inserting parenthesis and brackets

August 11, 2021; updated August 11, 2021

This is an insert mode remap that inserts both left and right brackets and places the cursor between them.

" {}
inoremap <leader>j {}<Esc>i

" ()
inoremap <leader>k ()<Esc>i

" []
inoremap <leader>l []<Esc>i

© 2021 Timothy de Jongh