@@ -19,7 +19,7 @@ filetype plugin on
1919" OPTIONS: {{{
2020
2121" 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' , ' ' )
2323
2424" Disable pymode warnings
2525call pymode#default (' g:pymode_warning' , 1 )
@@ -247,26 +247,46 @@ endif
247247" Disable python-related functionality
248248" let g:pymode_python = 'disable'
249249" 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>
253250
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+
256268 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
257275
258276else
259277
260278 let g: pymode_doc = 0
261279 let g: pymode_lint = 0
262280 let g: pymode_path = 0
263- let g: pymode_python = ' disable'
264281 let g: pymode_rope = 0
265282 let g: pymode_run = 0
266283 let g: pymode_virtualenv = 0
267284
285+ command ! -nargs =1 PymodePython echo <args>
286+
268287endif
269288
289+
270290command ! PymodeVersion echomsg " Pymode version: " . g: pymode_version . " interpreter: " . g: pymode_python . " lint: " . g: pymode_lint . " rope: " . g: pymode_rope
271291
272292augroup pymode
0 commit comments