]> Sergey Matveev's repositories - dotfiles.git/blob - vim/.vim/autoload/python/pep8.vim
Vim scripts refactoring
[dotfiles.git] / vim / .vim / autoload / python / pep8.vim
1 " PEP8 caller
2 " Maintainer: Sergey Matveev <stargrave@stargrave.org>
3 " License: GNU General Public License version 3 of the License or later
4 "
5 " Call pycodestyle utility and fill quickfix window with its results.
6
7 function! python#pep8#do() abort
8     set makeprg=PATH=$PATH\ pycodestyle\ --select=E,W\ %
9     silent make
10     sign unplace *
11     let l:id = 1
12     for item in getqflist()
13         execute(':sign place '.l:id.' name=P8 line='.l:item.lnum.' buffer='.l:item.bufnr)
14         let l:id = l:id + 2
15     endfor
16     redraw!
17     copen
18 endfunction