aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/grappele.vim
diff options
context:
space:
mode:
authorTeddy Wing2018-12-13 13:49:40 +0100
committerTeddy Wing2018-12-13 13:49:40 +0100
commit1926fc6c9fb6f724660a495f23afccc0830de069 (patch)
treecaba57c8987b2052d588ade1bf21cddaf47f9769 /plugin/grappele.vim
parent8b5481b9de6a72a6eede405dda8fb158d5358941 (diff)
downloadvim-grappele-1926fc6c9fb6f724660a495f23afccc0830de069.tar.bz2
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.
Diffstat (limited to 'plugin/grappele.vim')
-rw-r--r--plugin/grappele.vim12
1 files changed, 11 insertions, 1 deletions
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 <silent> <Plug>Grappele :<c-u>call grappele#Grappele(v:count)<cr>
-nnoremap <silent> <Plug>GrappeleRecall :<c-u>call grappele#Recall()<cr>
+nnoremap <silent> <Plug>GrappeleRecall :<c-u>call grappele#Recall('n')<cr>
+vnoremap <silent> <Plug>GrappeleRecall :<c-u>call grappele#Recall('v')<cr>
+onoremap <silent> <Plug>GrappeleRecall :<c-u>call grappele#Recall('o')<cr>
if !hasmapto('<Plug>Grappele') || !maparg('G', 'n')
nnoremap <silent> G :<c-u>call grappele#Grappele(v:count)<cr>
@@ -14,3 +16,11 @@ endif
if !hasmapto('<Plug>GrappeleRecall') || !maparg('gG', 'n')
nmap gG <Plug>GrappeleRecall
endif
+
+if !hasmapto('<Plug>GrappeleRecall') || !maparg('gG', 'v')
+ vmap gG <Plug>GrappeleRecall
+endif
+
+if !hasmapto('<Plug>GrappeleRecall') || !maparg('gG', 'o')
+ omap gG <Plug>GrappeleRecall
+endif