Skip to content

Commit 89de269

Browse files
committed
move initialization into ftplugin as it is python specific
1 parent 73fa0cb commit 89de269

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

Changelog.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Changelog
88
* Update `autopep8` to version 0.8.7;
99
* Fix breakpoint definition;
1010
* Update python syntax;
11-
* fixed run-time error when output non-ascii in multibyte locale;
11+
* Fixed run-time error when output non-ascii in multibyte locale;
12+
* Move initialization into ftplugin as it is python specific;
1213

1314
## 2012-09-07 0.6.10
1415
--------------------
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
if exists('did_init_pymode_vim')
2+
finish
3+
endif
4+
let did_init_pymode_vim = 1
5+
16
let g:pymode_version = "0.6.11"
27

38
com! PymodeVersion echomsg "Current python-mode version: " . g:pymode_version
@@ -43,8 +48,7 @@ python << EOF
4348
import sys, vim, os
4449

4550
curpath = vim.eval("getcwd()")
46-
libpath = os.path.join(os.path.dirname(os.path.dirname(
47-
vim.eval("expand('<sfile>:p')"))), 'pylibs')
51+
libpath = os.path.join(vim.eval("expand('<sfile>:p:h:h:h')"), 'pylibs')
4852

4953
sys.path = [os.path.dirname(libpath), libpath, curpath] + vim.eval("g:pymode_paths") + sys.path
5054
EOF

ftplugin/python/pymode.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
runtime ftplugin/python/init-pymode.vim
2+
13
if pymode#Default('b:pymode', 1)
24
finish
35
endif

syntax/python.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
" vim: ft=vim:fdm=marker
2+
"
3+
runtime ftplugin/python/init-pymode.vim
24

35
" DESC: Disable script loading
46
if !pymode#Option('syntax') || pymode#Default('b:current_syntax', 'python')

0 commit comments

Comments
 (0)