Brackets completion plugin, using the denops.vim.
This plugin respect for
cohama/lexima.vim and
machakann/vim-sandwich.
Please install deno.
After, install plugins as
follows.
dein.vim
call dein#add('vim-denops/denops.vim')
call dein#add('higashi000/dps-kakkonan')
Please input some brackets in insert mode.
Select text in visual mode.
After, please execute keybind that you set
up.
example
" dps-kakkonan surround text to backets example keymap
vmap sr( <Plug>(dps_kakkonan_surround_parenthesis)
vmap sr{ <Plug>(dps_kakkonan_surround_curly)
vmap sr[ <Plug>(dps_kakkonan_surround_square)
vmap sr" <Plug>(dps_kakkonan_surround_doublequote)
vmap sr' <Plug>(dps_kakkonan_surround_singlequote)
vmap sr` <Plug>(dps_kakkonan_surround_backquote)
Please execute :KakkonanDelete
on top of brackets, or settings keybind.
map <Leader>dk <Plug>(dps_kakkonan_delete_brackets)
Please set your keymap.
example
" dps-kakkonan replace brackets example keymap
map rp( <Plug>(dps_kakkonan_replace_parenthesis)
map rp{ <Plug>(dps_kakkonan_replace_curly)
map rp[ <Plug>(dps_kakkonan_replace_square)
map rp" <Plug>(dps_kakkonan_replace_doublequote)
map rp' <Plug>(dps_kakkonan_replace_singlequote)
map rp` <Plug>(dps_kakkonan_replace_backquote)
If you want to surround it with something you like, you can use it.
This
function is not supported delete
and replace
.
example settings
let g:kakkonan_custom_brackets = {
\ "h1": {
\ "start": "<h1>",
\ "finish": "</h1>"
\ },
\ "script": {
\ "start": "<script>",
\ "finish": "</script>"
\ },
\ "<": {
\ "start": "<",
\ "finish": ">"
\ },
\ }