summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/hackernews.py9
-rw-r--r--plugin/hackernews.vim12
2 files changed, 21 insertions, 0 deletions
diff --git a/plugin/hackernews.py b/plugin/hackernews.py
index e24974a..29a1b84 100644
--- a/plugin/hackernews.py
+++ b/plugin/hackernews.py
@@ -1,5 +1,14 @@
# -*- coding: utf-8 -*-
+# vim-hackernews
+# --------------
+# Browse Hacker News (news.ycombinator.com) inside Vim.
+#
+# Author: ryanss <ryanssdev@icloud.com>
+# Website: https://github.com/ryanss/vim-hackernews
+# License: MIT (see LICENSE file)
+
+
import HTMLParser
import json
import re
diff --git a/plugin/hackernews.vim b/plugin/hackernews.vim
index 768f136..d93195a 100644
--- a/plugin/hackernews.vim
+++ b/plugin/hackernews.vim
@@ -1,13 +1,25 @@
+" vim-hackernews
+" --------------
+" Browse Hacker News (news.ycombinator.com) inside Vim.
+"
+" Author: ryanss <ryanssdev@icloud.com>
+" Website: https://github.com/ryanss/vim-hackernews
+" License: MIT (see LICENSE file)
+
+
if !has('python')
echo "HackerNews.vim Error: Requires Vim compiled with +python"
finish
endif
+
" Import Python code
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()
+
au! BufRead,BufNewFile *.hackernews set filetype=hackernews