From 802d388c9dcc1c75b0acd8bcfe75cbd66c76838d Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 26 Sep 2020 13:50:44 +0200 Subject: Trying to fix omap (WIP) gG omap works characterwise but should work linewise. Adding V to the gG omap causes >17G to indent 17 times instead of once. Try changing `G` to an `` mapping to simplify the code, allowing it to work more exactly like the normal `G`. This resulted in moving the logic to `grappele#Recall()`, causing problems for `gG`. --- plugin/grappele.vim | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'plugin') diff --git a/plugin/grappele.vim b/plugin/grappele.vim index 9ab1400..e04c8e4 100644 --- a/plugin/grappele.vim +++ b/plugin/grappele.vim @@ -4,22 +4,22 @@ endif let g:loaded_grappele = 1 -nnoremap Grappele :call grappele#Grappele(v:count, 'n') -nnoremap GrappeleRecall :call grappele#Recall('n') -vnoremap GrappeleRecall :call grappele#Recall('v') -onoremap GrappeleRecall :call grappele#Recall('o') +nnoremap Grappele grappele#Grappele(v:count, 'n') +nnoremap GrappeleRecall :call grappele#Recall('n') +vnoremap GrappeleRecall :call grappele#Recall('v') +onoremap GrappeleRecall :call grappele#Recall('o') if !hasmapto('Grappele') || !maparg('G', 'n') - nnoremap G :call grappele#Grappele(v:count, 'n') + nnoremap G grappele#Grappele(v:count, 'n') endif if !hasmapto('Grappele') || !maparg('G', 'v') - vnoremap G - \ :call grappele#Grappele(v:count, 'v', visualmode()) + vnoremap G + \ grappele#Grappele(v:count, 'v', visualmode()) endif if !hasmapto('Grappele') || !maparg('G', 'o') - onoremap G :call grappele#Grappele(v:count, 'o') + onoremap G grappele#Grappele(v:count, 'o') endif if !hasmapto('GrappeleRecall') || !maparg('gG', 'n') -- cgit v1.2.3