1
0
mirror of https://github.com/amix/vimrc synced 2025-06-30 11:54:59 +08:00

Updated plugins

This commit is contained in:
Amir
2024-01-07 16:14:20 +01:00
parent 86762cf230
commit f676f799e7
172 changed files with 3227 additions and 1204 deletions

View File

@ -24,6 +24,14 @@ function! flake8#Flake8ShowError()
call s:ShowErrorMessage()
endfunction
function! flake8#Flake8NextError()
call s:JumpNextError()
endfunction
function! flake8#Flake8PrevError()
call s:JumpPrevError()
endfunction
"" }}}
"" ** internal ** {{{
@ -199,7 +207,6 @@ function! s:Flake8() " {{{
endfunction " }}}
"" markers
function! s:PlaceMarkers(results) " {{{
" in gutter?
@ -292,6 +299,57 @@ function! s:ShowErrorMessage() " {{{
echo
let b:showing_message = 0
endif
endfunction " }}}
function! s:JumpNextError() " {{{
let l:cursorLine = getpos(".")[1]
if !exists('s:resultDict')
return
endif
" Convert list of strings to ints
let l:lineList = []
for line in keys(s:resultDict)
call insert(l:lineList, line+0)
endfor
let l:sortedLineList = sort(l:lineList, 'n')
for line in l:sortedLineList
let l:line_int = line + 0
if line > l:cursorLine
call cursor(line, 1)
call s:ShowErrorMessage()
return
endif
endfor
call cursor(l:cursorLine, 1)
echo "Reached last error!"
endfunction " }}}
function! s:JumpPrevError() " {{{
let l:cursorLine = getpos(".")[1]
if !exists('s:resultDict')
return
endif
" Convert list of strings to ints
let l:lineList = []
for line in keys(s:resultDict)
call insert(l:lineList, line+0)
endfor
let l:sortedLineList = reverse(sort(l:lineList, 'n'))
for line in l:sortedLineList
let l:line_int = line + 0
if line < l:cursorLine
call cursor(line, 1)
call s:ShowErrorMessage()
return
endif
endfor
call cursor(l:cursorLine, 1)
echo "Reached first error!"
endfunction " }}}