Skip to content

Commit 6cd05bd

Browse files
committed
1 parent 94569bf commit 6cd05bd

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

autoload/pymode.vim

-7
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ endfunction "}}}
1212
" DESC: Import python libs
1313
fun! pymode#init(plugin_root, paths) "{{{
1414

15-
if g:pymode_python == 'disable'
16-
if g:pymode_warning
17-
call pymode#error("Pymode requires vim compiled with +python. Most of features will be disabled.")
18-
endif
19-
return
20-
endif
21-
2215
PymodePython import sys, vim
2316
PymodePython sys.path.insert(0, vim.eval('a:plugin_root'))
2417
PymodePython sys.path = vim.eval('a:paths') + sys.path

ftplugin/python/pymode.vim

+21-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,31 @@ if !g:pymode || pymode#default('b:pymode', 1)
22
finish
33
endif
44

5+
if g:pymode_python == 'disable'
6+
7+
if g:pymode_warning
8+
call pymode#error("Pymode requires vim compiled with +python. Most of features will be disabled.")
9+
endif
10+
11+
finish
12+
13+
else
14+
15+
516
let b:pymode_modified = &modified
617

718
" Init paths
819
if !pymode#default('g:pymode_init', 1)
9-
call pymode#init(expand('<sfile>:p:h:h:h'), g:pymode_paths)
10-
call pymode#virtualenv#init()
11-
call pymode#breakpoint#init()
12-
PymodePython from pymode.utils import patch_paths
13-
PymodePython patch_paths()
20+
21+
call pymode#init(expand('<sfile>:p:h:h:h'), g:pymode_paths)
22+
call pymode#virtualenv#init()
23+
call pymode#breakpoint#init()
24+
25+
PymodePython from pymode.utils import patch_paths
26+
PymodePython patch_paths()
27+
28+
endif
29+
1430
endif
1531

1632
command! -buffer -nargs=1 PymodeVirtualenv call pymode#virtualenv#activate(<args>)

0 commit comments

Comments
 (0)