File: khuno.vim

package info (click to toggle)
vim-khuno 1.0.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 684 kB
  • sloc: sh: 5; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 626 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
" File:        khuno.vim
" Description: A Python Flakes plugin: analyze your code on the fly
" Maintainer:  Alfredo Deza <alfredodeza AT gmail.com>
" License:     MIT
"
"============================================================================


function! khuno#Status(...) abort
    if !exists('b:flake_errors')
        return ''
    endif
    if (a:0 > 0)
        let text = a:1
    else
        let err_count = len(keys(b:flake_errors))
	if err_count >= 2
	    let text = err_count -1
	else
	    let text = 0
	endif
    endif
    if len(b:flake_errors)
        return '['.text.']'
    else
        return ''
endfunction