@@ -19,7 +19,7 @@ filetype plugin on
19
19
" OPTIONS: {{{
20
20
21
21
" Vim Python interpreter. Set to 'disable' for remove python features.
22
- call pymode#default (' g:pymode_python' , ' python ' )
22
+ call pymode#default (' g:pymode_python' , ' ' )
23
23
24
24
" Disable pymode warnings
25
25
call pymode#default (' g:pymode_warning' , 1 )
@@ -247,26 +247,46 @@ endif
247
247
" Disable python-related functionality
248
248
" let g:pymode_python = 'disable'
249
249
" let g:pymode_python = 'python3'
250
- if g: pymode_python != ' disable' && (g: pymode_python == ' python3' || ! has (' python' ) && has (' python3' ))
251
- let g: pymode_python = ' python3'
252
- command ! -nargs =1 PymodePython python3 <args>
253
250
254
- elseif g: pymode_python != ' disable' && has (' python' )
255
- let g: pymode_python = ' python'
251
+ " UltiSnips Fixes
252
+ if ! len (g: pymode_python )
253
+ if exists (' g:_uspy' ) && g: _uspy == ' :py'
254
+ let g: pymode_python = ' python'
255
+ elseif exists (' g:_uspy' ) && g: _uspy == ' :py3'
256
+ let g: pymode_python = ' python3'
257
+ elseif has (" python" )
258
+ let g: pymode_python = ' python'
259
+ elseif has (" python3" )
260
+ let g: pymode_python = ' python3'
261
+ else
262
+ let g: pymode_python = ' disable'
263
+ endif
264
+ endif
265
+
266
+ if g: pymode_python == ' python'
267
+
256
268
command ! -nargs =1 PymodePython python <args>
269
+ let g: UltiSnipsUsePythonVersion = 2
270
+
271
+ elseif g: pymode_python == ' python3'
272
+
273
+ command ! -nargs =1 PymodePython python3 <args>
274
+ let g: UltiSnipsUsePythonVersion = 3
257
275
258
276
else
259
277
260
278
let g: pymode_doc = 0
261
279
let g: pymode_lint = 0
262
280
let g: pymode_path = 0
263
- let g: pymode_python = ' disable'
264
281
let g: pymode_rope = 0
265
282
let g: pymode_run = 0
266
283
let g: pymode_virtualenv = 0
267
284
285
+ command ! -nargs =1 PymodePython echo <args>
286
+
268
287
endif
269
288
289
+
270
290
command ! PymodeVersion echomsg " Pymode version: " . g: pymode_version . " interpreter: " . g: pymode_python . " lint: " . g: pymode_lint . " rope: " . g: pymode_rope
271
291
272
292
augroup pymode
0 commit comments