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(":p:h") . "')" execute "python from hackernews import hacker_news, hacker_news_link" command! HackerNews python hacker_news() map :python hacker_news_link() au! BufRead,BufNewFile *.hackernews set filetype=hackernews