aboutsummaryrefslogtreecommitdiff
path: root/nvim/.config/nvim/plugin
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-11-20 05:52:10 +0000
committerAkshay <[email protected]>2020-11-20 05:52:10 +0000
commit54062528662142f27cb039992fe8e36e30da87db (patch)
tree1cde45bf6c036f8b2a86f6e26f017c55dfea02a5 /nvim/.config/nvim/plugin
parent4c7b6751ee381993e448ab43766555bf178ae28c (diff)
factor out textobjs into a plugin
Diffstat (limited to 'nvim/.config/nvim/plugin')
-rw-r--r--nvim/.config/nvim/plugin/textobjs.vim27
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
2xnoremap il g_o^
3onoremap il :normal vil<CR>
4xnoremap al $o0
5onoremap al :normal val<CR>
6
7" buffer text-objects
8" -------------------
9" i% a%
10xnoremap i% :<C-u>let z = @/\|1;/^./kz<CR>G??<CR>:let @/ = z<CR>V'z
11onoremap i% :normal vi%<CR>
12xnoremap a% GoggV
13onoremap a% :normal va%<CR>
14
15" comment text-objects
16" --------------------
17" i? a?
18xnoremap <buffer> i? ?/\*<CR>o/\*\/<CR>
19onoremap <buffer> i? :normal vi?<CR>
20
21" square brackets text-objects
22" ----------------------------
23" ir ar
24xnoremap ir i[
25xnoremap ar a[
26onoremap ir :normal vi[<CR>
27onoremap ar :normal va[<CR>