mirror of
https://github.com/gryf/pythonhelper.git
synced 2025-12-18 20:10:24 +01:00
Moved variable with script path out of function
Otherwise it will point to the current path, instead of script path. Changing it to script variables will change that behaviour to desirable one.
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
" File: pythonhelper.vim
|
" File: pythonhelper.vim
|
||||||
" Author: Michal Vitecek <fuf-at-mageo-dot-cz>
|
" Author: Michal Vitecek <fuf-at-mageo-dot-cz>
|
||||||
" Author: Roman Dobosz <gryf@vimja.com>
|
" Author: Roman Dobosz <gryf@vimja.com>
|
||||||
" Version: 0.84
|
" Version: 0.85
|
||||||
" Last Modified: 2016-05-21
|
" Last Modified: 2016-05-24
|
||||||
"
|
"
|
||||||
" Overview
|
" Overview
|
||||||
" --------
|
" --------
|
||||||
@@ -33,15 +33,16 @@
|
|||||||
|
|
||||||
" VIM functions {{{
|
" VIM functions {{{
|
||||||
let g:pythonhelper_python = 'python'
|
let g:pythonhelper_python = 'python'
|
||||||
|
let s:plugin_path = expand('<sfile>:p:h', 1)
|
||||||
|
|
||||||
function! s:PHLoader()
|
function! s:PHLoader()
|
||||||
let l:plugin_path = escape(expand('<sfile>:p:h'), '\')
|
|
||||||
|
|
||||||
if !exists('g:pythonhelper_py_loaded')
|
if !exists('g:pythonhelper_py_loaded')
|
||||||
if has('python')
|
if has('python')
|
||||||
exe 'pyfile ' . escape(l:plugin_path, ' ') . '/pythonhelper.py'
|
exe 'pyfile ' . s:plugin_path . '/pythonhelper.py'
|
||||||
elseif has('python3')
|
elseif has('python3')
|
||||||
let g:pythonhelper_python = 'python3'
|
let g:pythonhelper_python = 'python3'
|
||||||
exe 'py3file ' . escape(l:plugin_path, ' ') . '/pythonhelper.py'
|
exe 'py3file ' . s:plugin_path . '/pythonhelper.py'
|
||||||
else
|
else
|
||||||
echohl WarningMsg|echomsg
|
echohl WarningMsg|echomsg
|
||||||
\ "PythonHelper unavailable: "
|
\ "PythonHelper unavailable: "
|
||||||
|
|||||||
Reference in New Issue
Block a user