Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitad90cfa

Browse files
committed
Fix python detection
1 parentb92c982 commitad90cfa

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

‎plugin/pymode.vim

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ filetype plugin on
1919
" OPTIONS: {{{
2020

2121
" Vim Python interpreter. Set to 'disable' for remove python features.
22-
callpymode#default('g:pymode_python','python')
22+
callpymode#default('g:pymode_python','')
2323

2424
" Disable pymode warnings
2525
callpymode#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-
ifg:pymode_python!='disable'&& (g:pymode_python=='python3'||!has('python')&&has('python3'))
251-
letg:pymode_python='python3'
252-
command! -nargs=1 PymodePythonpython3<args>
253250

254-
elseifg:pymode_python!='disable'&&has('python')
255-
letg:pymode_python='python'
251+
" UltiSnips Fixes
252+
if!len(g:pymode_python)
253+
ifexists('g:_uspy')&&g:_uspy==':py'
254+
letg:pymode_python='python'
255+
elseifexists('g:_uspy')&&g:_uspy==':py3'
256+
letg:pymode_python='python3'
257+
elseifhas("python")
258+
letg:pymode_python='python'
259+
elseifhas("python3")
260+
letg:pymode_python='python3'
261+
else
262+
letg:pymode_python='disable'
263+
endif
264+
endif
265+
266+
ifg:pymode_python=='python'
267+
256268
command! -nargs=1 PymodePythonpython<args>
269+
letg:UltiSnipsUsePythonVersion=2
270+
271+
elseifg:pymode_python=='python3'
272+
273+
command! -nargs=1 PymodePythonpython3<args>
274+
letg:UltiSnipsUsePythonVersion=3
257275

258276
else
259277

260278
letg:pymode_doc=0
261279
letg:pymode_lint=0
262280
letg:pymode_path=0
263-
letg:pymode_python='disable'
264281
letg:pymode_rope=0
265282
letg:pymode_run=0
266283
letg:pymode_virtualenv=0
267284

285+
command! -nargs=1 PymodePythonecho<args>
286+
268287
endif
269288

289+
270290
command! PymodeVersionechomsg"Pymode version:" .g:pymode_version ." interpreter:" .g:pymode_python ." lint:" .g:pymode_lint ." rope:" .g:pymode_rope
271291

272292
augrouppymode

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp