- commit
- 2de4926b917a70e1338d8eebe2a71e256064950c
- parent
- 9ed392057d3f999aaa9295a18d1967e424224ece
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2019-02-25 11:01
rm markers reasoning: - not essential - they don't automatically close on cclose - they don't update on edits
Diffstat
| M | autoload/lint.vim | 26 | -------------------------- |
| M | plugin/lint.vim | 2 | -- |
2 files changed, 0 insertions, 28 deletions
diff --git a/autoload/lint.vim b/autoload/lint.vim
@@ -1,5 +1,3 @@1 -1 let s:signids = []2 -13 1 function! s:RunLinter(prg, format) 4 2 let l:old_makeprg = &makeprg 5 3 let l:old_errorformat = &errorformat @@ -24,24 +22,6 @@ function! s:RunLinter(prg, format) 24 22 return getqflist() 25 23 endfunction 26 2427 -1 function! s:PlaceMarkers(results)28 -1 execute 'sign define lint text=! texthl=Error'29 -130 -1 for i in s:signids31 -1 execute ':sign unplace '.i32 -1 endfor33 -1 let s:signids = []34 -135 -1 let l:id = 10036 -1 for result in a:results37 -1 if result.lnum38 -1 execute ':sign place '.l:id.' line='.result.lnum.' name=lint file='.expand('%:p')39 -1 let s:signids += [l:id]40 -1 let l:id += 141 -1 endif42 -1 endfor43 -1 endfunction44 -145 25 function! lint#Lint() 46 26 if !exists('g:lint_prg') || !exists('g:lint_format') 47 27 echon 'No linter configured' @@ -52,7 +32,6 @@ function! lint#Lint() 52 32 endif 53 33 let l:results = s:RunLinter(g:lint_prg, g:lint_format) 54 34 call filter(l:results, 'v:val.lnum')55 -1 call s:PlaceMarkers(l:results)56 35 if l:results != [] 57 36 copen 58 37 echon 'Lint found '.len(l:results).' issues' @@ -61,8 +40,3 @@ function! lint#Lint() 61 40 echon 'Lint OK' 62 41 endif 63 42 endfunction64 -165 -1 function! lint#Reset()66 -1 cclose67 -1 call s:PlaceMarkers([])68 -1 endfunction
diff --git a/plugin/lint.vim b/plugin/lint.vim
@@ -1,4 +1,2 @@ 1 1 command! Lint call lint#Lint()2 -1 command! LintReset call lint#Reset()3 -14 2 nnoremap <F7> :Lint<CR>