diff options
author | Akshay <[email protected]> | 2020-11-20 05:52:10 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2020-11-20 05:52:10 +0000 |
commit | 54062528662142f27cb039992fe8e36e30da87db (patch) | |
tree | 1cde45bf6c036f8b2a86f6e26f017c55dfea02a5 /nvim/.config/nvim/plugin | |
parent | 4c7b6751ee381993e448ab43766555bf178ae28c (diff) |
factor out textobjs into a plugin
Diffstat (limited to 'nvim/.config/nvim/plugin')
-rw-r--r-- | nvim/.config/nvim/plugin/textobjs.vim | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/nvim/.config/nvim/plugin/textobjs.vim b/nvim/.config/nvim/plugin/textobjs.vim deleted file mode 100644 index 16f9a46..0000000 --- a/nvim/.config/nvim/plugin/textobjs.vim +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | " line text-objects | ||
2 | xnoremap il g_o^ | ||
3 | onoremap il :normal vil<CR> | ||
4 | xnoremap al $o0 | ||
5 | onoremap al :normal val<CR> | ||
6 | |||
7 | " buffer text-objects | ||
8 | " ------------------- | ||
9 | " i% a% | ||
10 | xnoremap i% :<C-u>let z = @/\|1;/^./kz<CR>G??<CR>:let @/ = z<CR>V'z | ||
11 | onoremap i% :normal vi%<CR> | ||
12 | xnoremap a% GoggV | ||
13 | onoremap a% :normal va%<CR> | ||
14 | |||
15 | " comment text-objects | ||
16 | " -------------------- | ||
17 | " i? a? | ||
18 | xnoremap <buffer> i? ?/\*<CR>o/\*\/<CR> | ||
19 | onoremap <buffer> i? :normal vi?<CR> | ||
20 | |||
21 | " square brackets text-objects | ||
22 | " ---------------------------- | ||
23 | " ir ar | ||
24 | xnoremap ir i[ | ||
25 | xnoremap ar a[ | ||
26 | onoremap ir :normal vi[<CR> | ||
27 | onoremap ar :normal va[<CR> | ||