FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
vim-flake8/ftplugin/python_flake8.vim at master · nvie/vim-flake8 · GitHub
nvie
/
vim-flake8
Public
Notifications
You must be signed in to change notification settings
Fork
98
Star
1.1k
Code
Issues
13
Pull requests
5
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
vim-flake8
/
ftplugin
/
python_flake8.vim
Copy path
More file actions
More file actions
Latest commit
History
History
History
57 lines (50 loc) · 1.78 KB
Breadcrumbs
vim-flake8
/
ftplugin
/
python_flake8.vim
Copy path
File metadata and controls
57 lines (50 loc) · 1.78 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"
"
Python filetype plugin for running flake8
"
Language:
Python (ft=python)
"
Maintainer:
Vincent Driessen <vincent@3rdcloud.com>
"
Version:
Vim 7 (may work with lower Vim versions, but not tested)
"
URL:
http://github.com/nvie/vim-flake8
"
"
Only do this when not done yet for this buffer
if
exists
(
"
b:loaded_flake8_ftplugin
"
)
finish
endif
let
b:
loaded_flake8_ftplugin
=
1
let
s:
save_cpo
=
&
cpo
set
cpo
&
vim
"
" Highlight groups for errors
"
pep8 errors
highlight
default Flake8_Error
\
ctermbg
=
DarkRed ctermfg
=
Red cterm
=
bold
\
guibg
=
DarkRed guifg
=
Red
gui
=
bold
"
pep8 warnings
highlight
default Flake8_Warning
\
ctermbg
=
Yellow ctermfg
=
DarkYellow cterm
=
bold
\
guibg
=
Yellow guifg
=
DarkYellow
gui
=
bold
"
PyFlakes codes
highlight
default Flake8_PyFlake
\
ctermbg
=
DarkBlue ctermfg
=
Blue cterm
=
bold
\
guibg
=
DarkBlue guifg
=
Blue
gui
=
bold
"
McCabe complexity warnings
highlight
default Flake8_Complexity
\
ctermbg
=
DarkBlue ctermfg
=
Blue cterm
=
bold
\
guibg
=
DarkBlue guifg
=
Blue
gui
=
bold
"
naming conventions
highlight
default Flake8_Naming
\
ctermbg
=
DarkBlue ctermfg
=
Blue cterm
=
bold
\
guibg
=
DarkBlue guifg
=
Blue
gui
=
bold
"
to not break with old versions
function
!
Flake8
()
call
flake8#Flake8
()
endfunction
"
Add mappings, unless the user didn't want this.
"
The default mapping is registered under to <F7> by default, unless the user
"
remapped it already (or a mapping exists already for <F7>)
if
!
exists
(
"
no_plugin_maps
"
)
&&
!
exists
(
"
no_flake8_maps
"
)
if
!
hasmapto
(
'
Flake8(
'
)
&&
!
hasmapto
(
'
flake8#Flake8(
'
)
noremap
<buffer>
<F7>
:call flake8#Flake8()
<CR>
endif
endif
command
!
Flake :
call
flake8#Flake8
()
let
&
cpo
=
s:
save_cpo
unlet
s:
save_cpo
Back
|
FazBrowse Home
|
New Git URL