aboutsummaryrefslogtreecommitdiff
path: root/plugin/fall.vim
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2024-03-08 19:34:20 +0000
committerJosh Rahm <rahm@google.com>2024-03-08 19:34:20 +0000
commitfd5de6e1630c9e3a5966eb4101e376863676e58d (patch)
treeb6d483804abee1d6888e2e77819755877c332f12 /plugin/fall.vim
parentc8ef92cfb59f28c050b82e90fb813d25392e6664 (diff)
downloadfieldmarshal.vim-fd5de6e1630c9e3a5966eb4101e376863676e58d.tar.gz
fieldmarshal.vim-fd5de6e1630c9e3a5966eb4101e376863676e58d.tar.bz2
fieldmarshal.vim-fd5de6e1630c9e3a5966eb4101e376863676e58d.zip
Bunch of changes.
Salient changes are: Get rid of object remapping the quotes (i/a "/'/`) in favor of adding a new text object "next quotes" such as cin"/can"/etc. Added mappings in visual mode that behave like "fall", but for matching characters. So <C-v>ic will highlight the current character and all of the same character up and down. Super useful for making edits to columns of identical characters. Added a text object ic/ac that highlight all the lines that match. removed the uncommented paragraph text objects as they're broken anyway.
Diffstat (limited to 'plugin/fall.vim')
-rw-r--r--plugin/fall.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugin/fall.vim b/plugin/fall.vim
index 0001c37..8de1780 100644
--- a/plugin/fall.vim
+++ b/plugin/fall.vim
@@ -34,3 +34,12 @@ vnoremap <silent> ii <cmd>exec "normal! "
\ . fall#fall('j', '^\s*$')
\ . "kO"
\ . fall#fall('k', '^\s*$') . 'j' <cr>
+
+vnoremap <expr> <silent> ic fall#visual_same_character("jk")
+onoremap <silent> ic <cmd>exec "normal! V" . fall#visual_same_character("jk")<cr>
+
+vnoremap <expr> <silent> ijc fall#visual_same_character("j")
+onoremap <silent> ijc <cmd>exec "normal! V" . fall#visual_same_character("j")<cr>
+
+vnoremap <expr> <silent> ikc fall#visual_same_character("k")
+onoremap <silent> ikc <cmd>exec "normal! V" . fall#visual_same_character("k")<cr>