From 8db92b1752ccaa95ada91bfca9955603a0a1ea59 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 22 Jun 2019 16:22:05 +1200 Subject: Allow numbers in place of symbol leader maps --- vim/vimrc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'vim') diff --git a/vim/vimrc b/vim/vimrc index 6aa1838b..817b6938 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -1554,9 +1554,10 @@ nnoremap + "" Leader,_ uses last changed or yanked text as an object onoremap _ \ :execute 'normal! `[v`]' -"" Leader,% uses entire buffer as an object +"" Leader,% or Leader,5 uses entire buffer as an object onoremap % \ :execute 'normal! 1GVG' +omap 5 % " This group defines some useful motions, including navigating by indent " block using a custom plugin: @@ -1601,17 +1602,19 @@ nnoremap ? "" Leader,. runs the configured make program into the location list nnoremap . \ :lmake! -"" Leader,! repeats the last command, adding a bang -nnoremap ! - \ :! "" Leader,q formats the current paragraph nnoremap q gqap "" Leader,r acts as a replacement operator nmap r (ReplaceOperator) xmap r (ReplaceOperator) -"" Leader,* escapes regex metacharacters +"" Leader,!/1 repeats the last command, adding a bang +nnoremap ! + \ :! +nmap 1 ! nmap * (RegexEscape) +nmap 8 * xmap * (RegexEscape) +xmap 8 * " And last, but definitely not least, I'm required by Vim fanatic law to " include a mapping that reloads my whole configuration. This uses the -- cgit v1.2.3