60 lines
1.1 KiB
VimL
60 lines
1.1 KiB
VimL
function! NvimGdbNoTKeymaps()
|
|
tnoremap <silent> <buffer> <Esc> <C-\><C-n>
|
|
endfunction
|
|
|
|
" Taken from gitgutter README. Cycles through all hunks in all open buffers.
|
|
function! NextHunkAllBuffers()
|
|
let line = line('.')
|
|
GitGutterNextHunk
|
|
if line('.') != line
|
|
return
|
|
endif
|
|
|
|
let bufnr = bufnr('')
|
|
while 1
|
|
bnext
|
|
if bufnr('') == bufnr
|
|
return
|
|
endif
|
|
if !empty(GitGutterGetHunks())
|
|
1
|
|
GitGutterNextHunk
|
|
return
|
|
endif
|
|
endwhile
|
|
endfunction
|
|
|
|
function! PrevHunkAllBuffers()
|
|
let line = line('.')
|
|
GitGutterPrevHunk
|
|
if line('.') != line
|
|
return
|
|
endif
|
|
|
|
let bufnr = bufnr('')
|
|
while 1
|
|
bprevious
|
|
if bufnr('') == bufnr
|
|
return
|
|
endif
|
|
if !empty(GitGutterGetHunks())
|
|
normal! G
|
|
GitGutterPrevHunk
|
|
return
|
|
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 . "\<C-i>"
|
|
else
|
|
execute "normal " . j . "\<C-o>"
|
|
endif
|
|
endif
|
|
endfunction
|