summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorryanss2015-02-08 10:21:05 -0500
committerryanss2015-02-08 10:21:05 -0500
commitb8afecc06220a0882790e88638e8354040caf0d6 (patch)
tree59a65dc6e1fa6d3f9813ef1bdb20a23623c3559c
parentec096d03e55fcd1197205bd505c85ab8b09f0c6d (diff)
downloadvim-hn-b8afecc06220a0882790e88638e8354040caf0d6.tar.gz
Fix #9 ImportError on Windows
Use raw string literal to add vim script path to python system path so it doesn't escape single backslash characters.
-rw-r--r--plugin/hackernews.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/hackernews.vim b/plugin/hackernews.vim
index 3d0d80b..8516747 100644
--- a/plugin/hackernews.vim
+++ b/plugin/hackernews.vim
@@ -16,7 +16,7 @@ endif
" Import Python code
execute "python import sys"
-execute "python sys.path.append('" . expand("<sfile>:p:h") . "')"
+execute "python sys.path.append(r'" . expand("<sfile>:p:h") . "')"
execute "python from hackernews import hacker_news, hacker_news_link"