From 1926fc6c9fb6f724660a495f23afccc0830de069 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 13 Dec 2018 13:49:40 +0100 Subject: Add operator-pending and visual mode mappings New mappings that allow the stored `G` position to be used in both visual mode and operator-pending mode for greater flexibility. --- plugin/grappele.vim | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'plugin') diff --git a/plugin/grappele.vim b/plugin/grappele.vim index f02e46c..a0f0aa2 100644 --- a/plugin/grappele.vim +++ b/plugin/grappele.vim @@ -5,7 +5,9 @@ let g:loaded_grappele = 1 nnoremap Grappele :call grappele#Grappele(v:count) -nnoremap GrappeleRecall :call grappele#Recall() +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) @@ -14,3 +16,11 @@ endif if !hasmapto('GrappeleRecall') || !maparg('gG', 'n') nmap gG GrappeleRecall endif + +if !hasmapto('GrappeleRecall') || !maparg('gG', 'v') + vmap gG GrappeleRecall +endif + +if !hasmapto('GrappeleRecall') || !maparg('gG', 'o') + omap gG GrappeleRecall +endif -- cgit v1.2.3