File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33let current_dir = expand (' <sfile>:p:h/' )
44
5- let g: include_path = resolve (current_dir . ' /' . ' ../include' )
6- let g: src_path = resolve (current_dir . ' /' . ' ../src' )
5+ if ! exists (' g:include_path' )
6+ let g: include_path = resolve (current_dir . ' /' . ' ../include' )
7+ endif
8+
9+ if ! exists (' g:src_path' )
10+ let g: src_path = resolve (current_dir . ' /' . ' ../src' )
11+ endif
712
813let $PYTHONPATH = expand (" %:p:h" ) . " :" . $PYTHONPATH
914
1015python3 << EOF
11- import sys
12-
13- sys.path .append (vim .eval (' g:include_path' ))
14- sys.path .append (vim .eval (' g:src_path' ))
15-
1616import vim
1717EOF
1818
4141
4242endfunction
4343
44-
4544function ! CreatePythonCommands ()
46- python3 << EOF
45+
46+ python3 << EOF
47+
48+ import sys
49+ sys.path .append (vim .eval (' g:src_path' ))
50+ sys.path .append (vim .eval (' g:include_path' ))
51+
4752import os
4853import importlib.util
4954
You can’t perform that action at this time.
0 commit comments