Skip to content

Commit 311de67

Browse files
committed
Remove checks for Python 2 from Vim script
1 parent f5d4aee commit 311de67

File tree

4 files changed

+8
-25
lines changed

4 files changed

+8
-25
lines changed

doc/pymode.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ will appear, eg. `:botright`.
148148
2.1. Python version ~
149149
*pymode-python-version*
150150

151-
By default pymode looks for current python version supported in your Vim.
152-
You could choose prefer version, but value will be tested on loading.
151+
By default pymode will attempt to use Python 3, if available. However, you can
152+
also disable all Python features of pymode.
153153

154154
*'g:pymode_python'*
155155
>
156-
let g:pymode_python = 'python'
156+
let g:pymode_python = 'python3'
157157
158-
Values are `python`, `python3`, `disable`. If value set to `disable` most
158+
Values are `python3`, `disable`. If value set to `disable` most
159159
python-features of **pymode** will be disabled.
160160

161161
Set value to `python3` if you are working with python3 projects. You could use

ftplugin/python/pymode.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ if g:pymode_debug
232232
let g:pymode_debug_tempfile=matchstr(
233233
\ execute(
234234
\ g:pymode_python
235-
\ . " from __future__ import print_function;"
236235
\ . " import os;import tempfile; marker='|';"
237236
\ . " print(marker, tempfile.gettempdir(), os.sep, "
238237
\ . "'pymode_debug_file.txt', marker, sep='', end='')"),

plugin/pymode.vim

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ filetype plugin on
2222
if has("python3") && executable('python3')
2323
call pymode#default('g:pymode_python', 'python3')
2424
else
25-
call pymode#default('g:pymode_python', 'python')
25+
call pymode#default('g:pymode_python', 'disable')
2626
endif
2727

2828
" Disable pymode warnings
@@ -286,25 +286,14 @@ filetype plugin on
286286

287287
" UltiSnips Fixes
288288
if !len(g:pymode_python)
289-
if exists('g:_uspy') && g:_uspy == ':py'
290-
let g:pymode_python = 'python'
291-
elseif exists('g:_uspy') && g:_uspy == ':py3'
292-
let g:pymode_python = 'python3'
293-
elseif has("python")
294-
let g:pymode_python = 'python'
295-
elseif has("python3")
289+
if (exists('g:_uspy') && g:_uspy == ':py3') || has("python3")
296290
let g:pymode_python = 'python3'
297291
else
298292
let g:pymode_python = 'disable'
299293
endif
300294
endif
301295

302-
if g:pymode_python == 'python'
303-
304-
command! -nargs=1 PymodePython python <args>
305-
let g:UltiSnipsUsePythonVersion = 2
306-
307-
elseif g:pymode_python == 'python3'
296+
if g:pymode_python == 'python3'
308297

309298
command! -nargs=1 PymodePython python3 <args>
310299
let g:UltiSnipsUsePythonVersion = 3

readme.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,7 @@ Read this section before opening an issue on the tracker.
183183

184184
## Python 3 syntax
185185

186-
By default python-mode uses python 2 syntax checking. To enable python 3 syntax
187-
checking (e.g. for async) add:
188-
189-
let g:pymode_python = 'python3'
190-
191-
To your vimrc or exrc file.
186+
By default python-mode uses python 3 syntax checking.
192187

193188
## Symlinks on Windows
194189

0 commit comments

Comments
 (0)