This repository was archived by the owner on Dec 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +35
-9
lines changed Expand file tree Collapse file tree 2 files changed +35
-9
lines changed Original file line number Diff line number Diff line change @@ -89,11 +89,24 @@ Options
89
89
-------
90
90
91
91
Set this option in your vimrc file to disable quickfix support::
92
-
92
+
93
93
let g:pyflakes_use_quickfix = 0
94
94
95
95
The value is set to 1 by default.
96
96
97
+ Pyflakes can use Python 2 or Python 3 compiled into Vim. If you have both,
98
+ you can ask Pyflakes to prefer one or the other, with this in your vimrc::
99
+
100
+ let g:pyflakes_prefer_python_version = 3
101
+
102
+ or::
103
+
104
+ let g:pyflakes_prefer_python_version = 2
105
+
106
+ Pyflakes will chose Python 2 by default, if you have both. If you prefer a
107
+ version that you don't have, Pyflakes will quietly fall back to the version
108
+ that you do have.
109
+
97
110
TODO
98
111
----
99
112
* signs _ support (show warning and error icons to left of the buffer area)
Original file line number Diff line number Diff line change @@ -24,19 +24,32 @@ endif
24
24
if ! exists (" b:did_python_init" )
25
25
let b: did_python_init = 0
26
26
27
+ if ! has (' python' ) && ! has (' python3' )
28
+ echoerr " Error: Requires Vim compiled with +python or +python3"
29
+ finish
30
+ endif
31
+ " Default to Python 2
27
32
if has (' python' )
33
+ let py_cmd_ver = ' python'
34
+ else
35
+ let py_cmd_ver = ' python3'
36
+ endif
37
+ if exists (' g:pyflakes_prefer_python_version' )
38
+ if g: pyflakes_prefer_python_version == 3 && has (' python3' )
39
+ let py_cmd_ver = ' python3'
40
+ elseif g: pyflakes_prefer_python_version == 2 && has (' python' )
41
+ let py_cmd_ver = ' python'
42
+ endif
43
+ endif
44
+ if py_cmd_ver == ' python'
28
45
command ! -nargs =1 Python python <args>
29
- elseif has (' python3' )
30
- command ! -nargs =1 Python python3 <args>
31
46
else
32
- echo " Error: Requires Vim compiled with +python or +python3"
33
- finish
47
+ command ! -nargs =1 Python python3 <args>
34
48
endif
35
49
36
- if ! exists (' g:pyflakes_use_quickfix' )
37
- let g: pyflakes_use_quickfix = 1
38
- endif
39
-
50
+ if ! exists (' g:pyflakes_use_quickfix' )
51
+ let g: pyflakes_use_quickfix = 1
52
+ endif
40
53
41
54
Python << EOF
42
55
import vim
You can’t perform that action at this time.
0 commit comments