forked from amix/vimrc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
amix
committed
Jul 3, 2016
1 parent
b50cc96
commit d4db542
Showing
19 changed files
with
274 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4398,9 +4398,9 @@ The following checkers are available for Python (filetype "python"): | |
1. flake8...................|syntastic-python-flake8| | ||
2. Frosted..................|syntastic-python-frosted| | ||
3. mypy.....................|syntastic-python-mypy| | ||
4. pep8.....................|syntastic-python-pep8| | ||
5. Prospector...............|syntastic-python-prospector| | ||
6. py3kwarn.................|syntastic-python-py3kwarn| | ||
4. Prospector...............|syntastic-python-prospector| | ||
5. py3kwarn.................|syntastic-python-py3kwarn| | ||
6. pycodestyle..............|syntastic-python-pycodestyle| | ||
7. pydocstyle...............|syntastic-python-pydocstyle| | ||
8. Pyflakes.................|syntastic-python-pyflakes| | ||
9. Pylama...................|syntastic-python-pylama| | ||
|
@@ -4460,24 +4460,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it | |
accepts the standard options described at |syntastic-config-makeprg|. | ||
|
||
------------------------------------------------------------------------------ | ||
4. pep8 *syntastic-python-pep8* | ||
|
||
Name: pep8 | ||
Maintainer: LCD 47 <[email protected]> | ||
|
||
"Pep8" is a style checker for Python, derived from the conventions in PEP 8 | ||
(http://www.python.org/dev/peps/pep-0008/). See the project's page for | ||
details: | ||
|
||
https://github.com/jcrocholl/pep8 | ||
|
||
Checker options~ | ||
|
||
This checker is initialised using the "makeprgBuild()" function and thus it | ||
accepts the standard options described at |syntastic-config-makeprg|. | ||
|
||
------------------------------------------------------------------------------ | ||
5. Prospector *syntastic-python-prospector* | ||
4. Prospector *syntastic-python-prospector* | ||
|
||
Name: prospector | ||
Maintainer: LCD 47 <[email protected]> | ||
|
@@ -4500,7 +4483,7 @@ This checker is initialised using the "makeprgBuild()" function and thus it | |
accepts the standard options described at |syntastic-config-makeprg|. | ||
|
||
------------------------------------------------------------------------------ | ||
6. py3kwarn *syntastic-python-py3kwarn* | ||
5. py3kwarn *syntastic-python-py3kwarn* | ||
|
||
Name: py3kwarn | ||
Author: Liam Curry <[email protected]> | ||
|
@@ -4515,6 +4498,23 @@ Checker options~ | |
This checker is initialised using the "makeprgBuild()" function and thus it | ||
accepts the standard options described at |syntastic-config-makeprg|. | ||
|
||
------------------------------------------------------------------------------ | ||
6. pycodestyle *syntastic-python-pycodestyle* | ||
|
||
Name: pycodestyle | ||
Maintainer: LCD 47 <[email protected]> | ||
|
||
"pycodestyle" (formerly "pep8") is a style checker for Python, derived from | ||
the conventions in PEP 8 (http://www.python.org/dev/peps/pep-0008/). See the | ||
project's page for details: | ||
|
||
https://github.com/PyCQA/pycodestyle | ||
|
||
Checker options~ | ||
|
||
This checker is initialised using the "makeprgBuild()" function and thus it | ||
accepts the standard options described at |syntastic-config-makeprg|. | ||
|
||
------------------------------------------------------------------------------ | ||
7. pydocstyle *syntastic-python-pydocstyle* | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
sources_non_forked/syntastic/syntax_checkers/python/pycodestyle.vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
"============================================================================ | ||
"File: pycodestyle.vim | ||
"Description: Syntax checking plugin for syntastic | ||
"Maintainer: LCD 47 <lcd047 at gmail dot com> | ||
"License: This program is free software. It comes without any warranty, | ||
" to the extent permitted by applicable law. You can redistribute | ||
" it and/or modify it under the terms of the Do What The Fuck You | ||
" Want To Public License, Version 2, as published by Sam Hocevar. | ||
" See http://sam.zoy.org/wtfpl/COPYING for more details. | ||
" | ||
"============================================================================ | ||
|
||
if exists('g:loaded_syntastic_python_pycodestyle_checker') | ||
finish | ||
endif | ||
let g:loaded_syntastic_python_pycodestyle_checker = 1 | ||
|
||
let s:save_cpo = &cpo | ||
set cpo&vim | ||
|
||
function! SyntaxCheckers_python_pycodestyle_GetLocList() dict | ||
let makeprg = self.makeprgBuild({}) | ||
|
||
let errorformat = '%f:%l:%c: %m' | ||
|
||
let env = syntastic#util#isRunningWindows() ? {} : { 'TERM': 'dumb' } | ||
|
||
let loclist = SyntasticMake({ | ||
\ 'makeprg': makeprg, | ||
\ 'errorformat': errorformat, | ||
\ 'env': env, | ||
\ 'subtype': 'Style' }) | ||
|
||
for e in loclist | ||
let e['type'] = e['text'] =~? '^W' ? 'W' : 'E' | ||
endfor | ||
|
||
return loclist | ||
endfunction | ||
|
||
call g:SyntasticRegistry.CreateAndRegisterChecker({ | ||
\ 'filetype': 'python', | ||
\ 'name': 'pycodestyle'}) | ||
|
||
let &cpo = s:save_cpo | ||
unlet s:save_cpo | ||
|
||
" vim: set sw=4 sts=4 et fdm=marker: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
let s:current_file = expand("<sfile>") | ||
|
||
function! go#template#create() | ||
let l:root_dir = fnamemodify(s:current_file, ':h:h:h') | ||
|
||
let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd ' | ||
let dir = getcwd() | ||
execute cd . fnameescape(expand("%:p:h")) | ||
|
||
let l:package_name = go#tool#PackageName() | ||
|
||
" if we can't figure out any package name(no Go files or non Go package | ||
" files) from the directory create the template | ||
if l:package_name == -1 | ||
let l:template_file = get(g:, 'go_template_file', "hello_world.go") | ||
let l:template_path = go#util#Join(l:root_dir, "templates", l:template_file) | ||
exe '0r ' . l:template_path | ||
$delete _ | ||
else | ||
let l:content = printf("package %s", l:package_name) | ||
call append(0, l:content) | ||
$delete _ | ||
endif | ||
|
||
" Remove the '... [New File]' message line from the command line | ||
echon | ||
|
||
execute cd . fnameescape(dir) | ||
endfunction | ||
|
||
" vim: sw=2 ts=2 et |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.