修改sandwich默认映射

silent! nmap <unique> ta <Plug>(operator-sandwich-add)
silent! xmap <unique> ta <Plug>(operator-sandwich-add)
silent! omap <unique> ta <Plug>(operator-sandwich-g@)

" delete
silent! xmap <unique> td <Plug>(operator-sandwich-delete)

" replace
silent! xmap <unique> tr <Plug>(operator-sandwich-replace)

vim-sandwich\plugin\operator\sandwich.vim里面的最后下面修改.
因为s键还是常用的.而t基本上很少用.就映射了.
后面感觉速度慢,于是用:map s发现还有几个映射.
plugin\sandwich.vim找到最后几行.

silent! nmap <unique><silent> td <Plug>(operator-sandwich-delete)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)
silent! nmap <unique><silent> tr <Plug>(operator-sandwich-replace)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)
silent! nmap <unique><silent> tdb <Plug>(operator-sandwich-delete)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-auto-a)
silent! nmap <unique><silent> trb <Plug>(operator-sandwich-replace)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-auto-a)

s改为如上的t.

posted @ 2020-11-05 17:40  zjh6  阅读(15)  评论(0)    收藏  举报  来源