Advertisement
voyeg3r

GotoJump.vim

Sep 13th, 2020
2,792
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 0.35 KB | None | 0 0
  1. function! GotoJump()
  2.   jumps
  3.   let j = input("Please select your jump: ")
  4.   if j != ''
  5.     let pattern = '\v\c^\+'
  6.     if j =~ pattern
  7.       let j = substitute(j, pattern, '', 'g')
  8.       execute "normal " . j . "\<c-i>"
  9.     else
  10.       execute "normal " . j . "\<c-o>"
  11.     endif
  12.   endif
  13. endfunction
  14.  
  15. nnoremap <Leader>j :call GotoJump()<CR>
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement