> > All the python files seem located in plugin/UltiSnips, but you
> > have some subdirs inside it. Here is the tree :
> >
> > [...]/vim-addon-manager/UltiSnips/plugin/UltiSnips
> >
> > __init__.py
> > __init__.pyc
> > _diff.py
> > _diff.pyc
> > _vim.py
> > _vim.pyc
> > compatibility.py
> > compatibility.pyc
> > compatibility_py2.py
> > compatibility_py2.pyc
> > compatibility_py3.py
> > debug.py
>
> [...]
>
> Hmm, that's a lot of files. So how did it find these (or at least the
> one included from Vim script) before? Does it specify a path in the
> "import"?
In the main UltiSnips.vim file, you have :
exec g:_uspy "import vim, os, sys"
exec g:_uspy "new_path = vim.eval('expand(\"<sfile>:h\")')"
exec g:_uspy "vim.command(\"let g:UltiSnipsPythonPath = '%s'\" %
new_path)"
exec g:_uspy "sys.path.append(new_path)"
exec g:_uspy "from UltiSnips import UltiSnips_Manager"
where g:_uspy is ":py" or ":py3", automatically set. In the python dir,
__init__.py contains :
from UltiSnips.compatibility import as_unicode, byte2col
from UltiSnips._diff import diff, guess_edit
from UltiSnips.geometry import Position
from UltiSnips.text_objects import SnippetInstance
from UltiSnips.util import IndentUtil
import UltiSnips._vim as _vim
Note that the value of g:UltiSnipsPythonPath is correct :
[...]/vim-addon-manager/UltiSnips/plugin
as in the previous vim version (1156)
I also checked the value of sys.path, once vim started. It contains the
value of g:UltiSnipsPythonPath. In fact, both lists (from versions 1156
and 1163) seem identical, except for a strange :
_vim_path_
new element.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.