summaryrefslogtreecommitdiff
path: root/plugin/hackernews.vim
diff options
context:
space:
mode:
authorryanss2015-01-05 23:59:00 -0500
committerryanss2015-01-05 23:59:00 -0500
commita7cff5c6d5f69bf1c262168432e3eb0e1be9369f (patch)
tree41906754b6e7c223ae218a61c75aa3ad03cc081e /plugin/hackernews.vim
downloadvim-hn-a7cff5c6d5f69bf1c262168432e3eb0e1be9369f.tar.gz
Initial commit
Diffstat (limited to 'plugin/hackernews.vim')
-rw-r--r--plugin/hackernews.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugin/hackernews.vim b/plugin/hackernews.vim
new file mode 100644
index 0000000..1edb19d
--- /dev/null
+++ b/plugin/hackernews.vim
@@ -0,0 +1,10 @@
+if !has('python')
+ echo "HackerNews.vim Error: Requires Vim compiled with +python"
+ finish
+endif
+
+" Import Python code
+let s:path = expand("<sfile>:p:h")
+execute "pyfile " . s:path . "/hackernews.py"
+
+command! HackerNews python hacker_news()