aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2020-10-12 00:32:17 +0800
committerjdhao <jdhao@hotmail.com>2020-10-12 00:32:17 +0800
commitbd2d4334e366d7f093e7ba968ccda89f3e3b1f75 (patch)
tree340c103f6685d4c057862907c6cbfe13d28f6bdd
parent6ebbd9c3abe12f1f1afdd36510a1499906b02e7d (diff)
update vim-sandwich mappings
-rw-r--r--plugins.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins.vim b/plugins.vim
index 3493c5e..c3dec7f 100644
--- a/plugins.vim
+++ b/plugins.vim
@@ -690,6 +690,20 @@ call deoplete#custom#source('emoji', 'converters', ['converter_emoji'])
nmap s <Nop>
xmap s <Nop>
+" mappings for add surround
+nmap ys <Plug>(operator-sandwich-add)
+xmap ys <Plug>(operator-sandwich-add)
+omap ys <Plug>(operator-sandwich-g@)
+
+" mappings for delete surround
+nmap dsb <Plug>(operator-sandwich-delete)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-auto-a)
+nmap ds <Plug>(operator-sandwich-delete)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)
+xmap ds <Plug>(operator-sandwich-delete)
+
+" mappings for change surround
+nmap csb <Plug>(operator-sandwich-replace)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-auto-a)
+nmap cs <Plug>(operator-sandwich-replace)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)
+xmap cs <Plug>(operator-sandwich-replace)
"}}
"{{ LaTeX editting