diff options
Diffstat (limited to 'after/ftplugin')
-rw-r--r-- | after/ftplugin/python.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/after/ftplugin/python.vim b/after/ftplugin/python.vim new file mode 100644 index 0000000..642e1c0 --- /dev/null +++ b/after/ftplugin/python.vim | |||
@@ -0,0 +1,10 @@ | |||
1 | python3 << EOF | ||
2 | import os | ||
3 | import sys | ||
4 | import vim | ||
5 | for p in sys.path: | ||
6 | # Add each directory in sys.path, if it exists. | ||
7 | if os.path.isdir(p): | ||
8 | # Command 'set' needs backslash before each space. | ||
9 | vim.command(r"set path+=%s" % (p.replace(" ", r"\ "))) | ||
10 | EOF | ||