if !has('python') echo "HackerNews.vim Error: Requires Vim compiled with +python" finish endif " Import Python code let s:path = expand(":p:h") execute "pyfile " . s:path . "/hackernews.py" command! HackerNews python hacker_news() map :python hacker_news_item() au! BufRead,BufNewFile *.hackernews set filetype=hackernews