aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--autoload/grappele.vim17
-rw-r--r--plugin/grappele.vim2
2 files changed, 17 insertions, 2 deletions
diff --git a/autoload/grappele.vim b/autoload/grappele.vim
index d2401a4..7d7c660 100644
--- a/autoload/grappele.vim
+++ b/autoload/grappele.vim
@@ -1,2 +1,17 @@
-function! grappele#Grappele()
+function! grappele#Grappele(line)
+ let l:current_buffer = 0
+ let l:column_position = 0
+ let l:column_offset = 0
+
+ if a:line ==# 0
+ " Go to the end of the buffer
+ $
+ else
+ call setpos('.', [
+ \ l:current_buffer,
+ \ a:line,
+ \ l:column_position,
+ \ l:column_offset
+ \ ])
+ endif
endfunction
diff --git a/plugin/grappele.vim b/plugin/grappele.vim
index a37e945..64d24b5 100644
--- a/plugin/grappele.vim
+++ b/plugin/grappele.vim
@@ -4,7 +4,7 @@ endif
let g:loaded_grappele = 1
-nnoremap <Plug>Grappele :<c-u>call grappele#Grappele()<cr>
+nnoremap <Plug>Grappele :<c-u>call grappele#Grappele(v:count)<cr>
if !hasmapto('<Plug>Grappele') || !maparg('G', 'n')
nmap G <Plug>Grappele