vim: Add surround and delimitMate plugins

These plugins add functionality to automatically close and surround text
with parantheses, brackets, quotes, etc.
Overwrite the vim-surround default bindings since they conflict with my
substitute bindings.
This commit is contained in:
2020-11-05 13:08:04 +01:00
parent 74dd5de08d
commit fdaa2dedb7
5 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
" Overwrite vim-surround bindings.
nmap ds <Plug>Dsurround
nmap cs <Plug>Csurround
nmap cS <Plug>CSurround
nmap ys <Plug>Ysurround
nmap yS <Plug>YSurround
nmap yss <Plug>Yssurround
nmap ySS <Plug>YSsurround
xmap s <Plug>VSurround
xmap gs <Plug>VgSurround

View File

@@ -7,8 +7,14 @@ if (has('patch-8.1.1719') || has('nvim'))
endif
" Theme
packadd! onedark.vim
" Automatically close parentheses, brackets, quotes, etc.
packadd! delimitMate
" Git information
packadd! vim-gitgutter
" Surround text with parentheses, brackets, quotes, tags, etc.
let g:surround_no_mappings = 1
packadd! vim-surround
source $XDG_CONFIG_HOME/vim/vim-surround.vim
" Settings #####################################################################
" hybrid linenumbers