diff options
author | Teddy Wing | 2015-09-13 16:28:22 -0400 |
---|---|---|
committer | Teddy Wing | 2015-09-13 16:28:22 -0400 |
commit | 059cffa4d69ecfde1c13268413b92bef1de4f4d1 (patch) | |
tree | 53382773f55129d7f8bbd33b95660e9a22b71ea6 /autoload | |
parent | 3620ae942d88ea22d677cea4fa5dab7b10923df0 (diff) | |
download | vim-grappele-059cffa4d69ecfde1c13268413b92bef1de4f4d1.tar.bz2 |
Replicate n_G functionality
Go to the end of the buffer when typed with no count, otherwise go to
the line specified by `v:count`.
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/grappele.vim | 17 |
1 files changed, 16 insertions, 1 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 |