add vim-expand-region

This commit is contained in:
Gered 2024-09-07 14:58:07 -04:00
parent 706ac2ace6
commit 5fb6ebdad4
2 changed files with 30 additions and 0 deletions

View file

@ -46,6 +46,7 @@
"todo-comments.nvim": { "branch": "main", "commit": "319c01b99b7a8c9ac2066bf0efd4d6ec68fef444" },
"toggleterm.nvim": { "branch": "main", "commit": "137d06fb103952a0fb567882bb8527e2f92d327d" },
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
"vim-expand-region": { "branch": "master", "commit": "966513543de0ddc2d673b5528a056269e7917276" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" }
}

View file

@ -0,0 +1,29 @@
return {
{
'terryma/vim-expand-region',
keys = {
{ 'v', mode = { 'x' }, '<Plug>(expand_region_expand)', desc = 'expand_region_expand' },
{ 'V', mode = { 'x' }, '<Plug>(expand_region_shrink)', desc = 'expand_region_shrink' },
},
init = function()
vim.cmd [[
let g:expand_region_text_objects = {
\ 'iw' :0,
\ 'iW' :0,
\ 'i"' :0,
\ 'i''' :0,
\ 'i]' :1,
\ 'ib' :1,
\ 'iB' :1,
\ 'il' :1,
\ 'ii' :1,
\ 'ip' :0,
\ 'ie' :0,
\ 'a]' :1,
\ 'ab' :1,
\ 'aB' :1,
\ }
]]
end,
},
}