From 660cb1a271429a8a9992369256addd77d897d1eb Mon Sep 17 00:00:00 2001 From: "Andy K. Massimino" Date: Sat, 3 Mar 2018 12:59:36 -0500 Subject: [PATCH] Add note about I%/A% re. #16 --- README.md | 19 +++++++++++++++++++ doc/matchup.txt | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/README.md b/README.md index 8960056..296b46b 100644 --- a/README.md +++ b/README.md @@ -566,6 +566,25 @@ _Options planned_. let g:matchup_delim_stopline = 1500 " generally let g:matchup_matchparen_stopline = 400 " for match highlighting only ``` +- The maps `1i%` and `1a%` are difficult to press. + + You may use the following maps `I%` and `A%` for convenience: + + ```vim + function! s:matchup_convenience_maps() + xnoremap (std-I) I + xnoremap (std-A) A + xmap I mode()==''?'(std-I)':(v:count?'':'1').'i' + xmap A mode()==''?'(std-A)':(v:count?'':'1').'a' + for l:v in ['', 'v', 'V', ''] + execute 'omap ' l:v.'I%' "(v:count?'':'1').'".l:v."i%'" + execute 'omap ' l:v.'A%' "(v:count?'':'1').'".l:v."a%'" + endfor + endfunction + call s:matchup_convenience_maps() + ``` + + Note: this is not compatible with the plugin targets.vim. - How can I contribute? diff --git a/doc/matchup.txt b/doc/matchup.txt index 306d39d..bdf74e1 100644 --- a/doc/matchup.txt +++ b/doc/matchup.txt @@ -661,6 +661,24 @@ A The number of search lines is limited for performance reasons. You may let g:matchup_delim_stopline = 1500 " generally let g:matchup_matchparen_stopline = 400 " for match highlighting only < +Q The maps `1i%` and `1a%` are difficult to press. + +A You may use the following maps `I%` and `A%` for convenience: > + + function! s:matchup_convenience_maps() + xnoremap (std-I) I + xnoremap (std-A) A + xmap I mode()==''?'(std-I)':(v:count?'':'1').'i' + xmap A mode()==''?'(std-A)':(v:count?'':'1').'a' + for l:v in ['', 'v', 'V', ''] + execute 'omap ' l:v.'I%' "(v:count?'':'1').'".l:v."i%'" + execute 'omap ' l:v.'A%' "(v:count?'':'1').'".l:v."a%'" + endfor + endfunction + call s:matchup_convenience_maps() +< + Note: this is not compatible with the plugin targets.vim. + Q How can I contribute? A Read the contribution guidelines (CONTRIBUTING.md) and issue template