dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/.config/nvim/after/ftplugin/qf.vim

47 lines
925 B
VimL

setlocal cursorline
setlocal nospell
setlocal nolist
" Close with q
nnoremap <silent><buffer> q :<C-u>close<CR>
nnoremap <silent><buffer> dd :call qf#delitem()<Cr>
nnoremap <buffer><silent> <C-j> :<C-u>call <SID>older()<CR>
nnoremap <buffer><silent> <C-k> :<C-u>call <SID>newer()<CR>
function! s:is_quickfix() abort
return getwininfo(win_getid())[0].quickfix
endfunction
if !exists('*s:older')
function! s:older() abort
try
if s:is_quickfix()
colder
else
lolder
endif
catch
echohl ErrorMsg
echo substitute(v:exception, 'Vim(.*):', '', '')
echohl None
endtry
endfunction
endif
if !exists('*s:newer')
function! s:newer() abort
try
if s:is_quickfix()
cnewer
else
lnewer
endif
catch
echohl ErrorMsg
echo substitute(v:exception, 'Vim(.*):', '', '')
echohl None
endtry
endfunction
endif