diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 2c5426a..30d0a38 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -195,6 +195,10 @@ inoremap cnoremap " Use Q to execute default register. nnoremap Q +" Jump and change list +nnoremap o :call GotoJump() +nnoremap ; :changes:keepjumps norm g; +nnoremap , :changes:keepjumps norm g, " For Fuzzy nnoremap ff :GFiles @@ -592,3 +596,17 @@ function! PrevHunkAllBuffers() endif endwhile endfunction + +function! GotoJump() + jumps + let j = input("Please select your jump: ") + if j != '' + let pattern = '\v\c^\+' + if j =~ pattern + let j = substitute(j, pattern, '', 'g') + execute "normal " . j . "\" + else + execute "normal " . j . "\" + endif + endif +endfunction