blob: b4052538303ed32aaf07acf712fea7f482f72417 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
if !has('python')
echo "HackerNews.vim Error: Requires Vim compiled with +python"
finish
endif
" Import Python code
let s:path = expand("<sfile>:p:h")
execute "pyfile " . s:path . "/hackernews.py"
command! HackerNews python hacker_news()
map <return> :python hacker_news_item()<cr>
au! BufRead,BufNewFile *.hackernews set filetype=hackernews
|