" vim-hackernews " -------------- " Browse Hacker News (news.ycombinator.com) inside Vim. " " Author: ryanss " Website: https://github.com/ryanss/vim-hackernews " License: MIT (see LICENSE file) " Version: 0.1.1 if !has('python') echo "HackerNews.vim Error: Requires Vim compiled with +python" finish endif if !exists("g:hackernews_marks") let g:hackernews_marks = {} endif " Import Python code execute "python import sys" execute "python sys.path.append(r'" . expand(":p:h") . "')" python << EOF if 'hackernews' not in sys.modules: import hackernews else: # Reload python module to avoid errors when updating plugin hackernews = reload(hackernews) EOF " Load front page execute "python hackernews.main()" noremap o :python hackernews.link() noremap O :python hackernews.link(external=True) noremap u u:python hackernews.recall_pos() noremap :python hackernews.recall_pos()