blob: f73512a8839023ae622251a4731d79d2ed72647c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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()
map <return> :python hacker_news_link()<cr>
au! BufRead,BufNewFile *.hackernews set filetype=hackernews
|