From 883aee9bae5522d221ea5ae768fe02046deff2c0 Mon Sep 17 00:00:00 2001 From: yushyin Date: Sat, 22 Sep 2018 17:35:35 +0200 Subject: Vim: Add plugins textobj-(user,between,indent) --- vim/dein.toml | 15 +++++++++++++++ vim/vimrc | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/vim/dein.toml b/vim/dein.toml index 6ad98d7..774b974 100644 --- a/vim/dein.toml +++ b/vim/dein.toml @@ -103,3 +103,18 @@ repo = 'rhysd/vim-operator-surround' lazy = 1 [plugins.on_map] n = '' + +[[plugins]] +repo = 'kana/vim-textobj-user' + +[[plugins]] +repo = 'thinca/vim-textobj-between' +lazy = 1 +on_map = { xo = '' } +depends = ['vim-textobj-user'] + +[[plugins]] +repo = 'kana/vim-textobj-indent' +lazy = 1 +on_map = { xo = '' } +depends = ['vim-textobj-user'] diff --git a/vim/vimrc b/vim/vimrc index 9ab42cd..fda8fa4 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -75,6 +75,25 @@ endif if dein#tap('vim-easy-align') nmap ga (EasyAlign) endif +if dein#tap('vim-textobj-between') + let g:textobj_between_no_default_key_mappings = 1 + omap af (textobj-between-a) + omap if (textobj-between-i) + xmap af (textobj-between-a) + xmap if (textobj-between-i) +endif +if dein#tap('vim-textobj-indent') + let g:textobj_indent_no_default_key_mappings = 1 + omap ai (textobj-indent-a) + omap ii (textobj-indent-i) + xmap ai (textobj-indent-a) + xmap ii (textobj-indent-i) + + omap aI (textobj-indent-same-a) + omap iI (textobj-indent-same-i) + xmap aI (textobj-indent-same-a) + xmap iI (textobj-indent-same-i) +endif if dein#tap('vim-operator-surround') nmap sa (operator-surround-append) nmap sd (operator-surround-delete) -- cgit v1.2.3-24-g4f1b