summaryrefslogtreecommitdiff
path: root/plugin/hackernews.vim
diff options
context:
space:
mode:
authorryanss2015-01-12 23:59:00 -0500
committerryanss2015-01-12 23:59:00 -0500
commit7151ac23fd2f2e04c69d1fb642081201c8a16ce6 (patch)
tree244632b642feb987263b5afe9e0d5e0ef265dbd4 /plugin/hackernews.vim
parent0e72d030addb30976089a98bbfaffdc0f10eacd7 (diff)
downloadvim-hn-7151ac23fd2f2e04c69d1fb642081201c8a16ce6.tar.gz
Add readability parsing for reading linked pages
Diffstat (limited to 'plugin/hackernews.vim')
-rw-r--r--plugin/hackernews.vim7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugin/hackernews.vim b/plugin/hackernews.vim
index b405253..f73512a 100644
--- a/plugin/hackernews.vim
+++ b/plugin/hackernews.vim
@@ -5,13 +5,14 @@ endif
" Import Python code
-let s:path = expand("<sfile>:p:h")
-execute "pyfile " . s:path . "/hackernews.py"
+execute "python import sys"
+execute "python sys.path.append('" . expand("<sfile>:p:h") . "')"
+execute "python from hackernews import hacker_news, hacker_news_link"
command! HackerNews python hacker_news()
-map <return> :python hacker_news_item()<cr>
+map <return> :python hacker_news_link()<cr>
au! BufRead,BufNewFile *.hackernews set filetype=hackernews