From 8e206e6d4ad49d70e4adc2b79feea4bbc426a3f2 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 13 Sep 2015 16:41:59 -0400 Subject: Create G recall command * Add mapping for the recall command. Using `gG` because it's quick, easy to remember, and doesn't appear to be used for anything. * Create `grappele#Recall()` function that goes to the last `G` count * Store the most recent count passed into `G` Using the recall command, you can `G` to the same count that you previously used no matter what buffer you're now in. TODO: The `G` command appears to be running slowly now for whatever reason. Investigate what's going on. --- plugin/grappele.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugin') diff --git a/plugin/grappele.vim b/plugin/grappele.vim index a4fd3fa..a86c02a 100644 --- a/plugin/grappele.vim +++ b/plugin/grappele.vim @@ -5,7 +5,12 @@ let g:loaded_grappele = 1 nnoremap Grappele :call grappele#Grappele(v:count) +nnoremap GrappeleRecall :call grappele#Recall() if !hasmapto('Grappele') || !maparg('G', 'n') nmap G Grappele endif + +if !hasmapto('GrappeleRecall') || !maparg('gG', 'n') + nmap gG GrappeleRecall +endif -- cgit v1.2.3