summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vim/dein.toml15
-rw-r--r--vim/vimrc19
2 files changed, 34 insertions, 0 deletions
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 = '<Plug>'
+
+[[plugins]]
+repo = 'kana/vim-textobj-user'
+
+[[plugins]]
+repo = 'thinca/vim-textobj-between'
+lazy = 1
+on_map = { xo = '<Plug>' }
+depends = ['vim-textobj-user']
+
+[[plugins]]
+repo = 'kana/vim-textobj-indent'
+lazy = 1
+on_map = { xo = '<Plug>' }
+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 <Plug>(EasyAlign)
endif
+if dein#tap('vim-textobj-between')
+ let g:textobj_between_no_default_key_mappings = 1
+ omap af <Plug>(textobj-between-a)
+ omap if <Plug>(textobj-between-i)
+ xmap af <Plug>(textobj-between-a)
+ xmap if <Plug>(textobj-between-i)
+endif
+if dein#tap('vim-textobj-indent')
+ let g:textobj_indent_no_default_key_mappings = 1
+ omap ai <Plug>(textobj-indent-a)
+ omap ii <Plug>(textobj-indent-i)
+ xmap ai <Plug>(textobj-indent-a)
+ xmap ii <Plug>(textobj-indent-i)
+
+ omap aI <Plug>(textobj-indent-same-a)
+ omap iI <Plug>(textobj-indent-same-i)
+ xmap aI <Plug>(textobj-indent-same-a)
+ xmap iI <Plug>(textobj-indent-same-i)
+endif
if dein#tap('vim-operator-surround')
nmap <silent>sa <Plug>(operator-surround-append)
nmap <silent>sd <Plug>(operator-surround-delete)