From 0b9d3d53b776d0f6128c64e8b73557b137d88e4c Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Fri, 9 Sep 2022 18:37:40 +0000 Subject: move.vim: Add some extra object mappings a% - selects (V)isual from the current line, finds the next { and jumps to the matching one (%). Good for deleting around bodies in C-like languages. i% - finds the next { enters (v)isual, jumpts to matching, and shrinks the selection by a character. (so it changes whatever is in the '{'). Good for changing the contents inside a C-style body. --- plugin/move.vim | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 plugin/move.vim diff --git a/plugin/move.vim b/plugin/move.vim new file mode 100644 index 0000000..0ed2e7f --- /dev/null +++ b/plugin/move.vim @@ -0,0 +1,5 @@ +onoremap a% Vcall search('{') normal! % +onoremap i% call search('{') normal! v%o + +vnoremap a% V/{% +vnoremap i% /{v%oo -- cgit