diff options
| -rw-r--r-- | ftplugin/hackernews.vim | 9 | ||||
| -rw-r--r-- | plugin/hackernews.vim | 11 |
2 files changed, 11 insertions, 9 deletions
diff --git a/ftplugin/hackernews.vim b/ftplugin/hackernews.vim index dbf5f4b..17c7c59 100644 --- a/ftplugin/hackernews.vim +++ b/ftplugin/hackernews.vim @@ -18,15 +18,6 @@ else endif -if !exists("g:hackernews_marks") - let g:hackernews_stories = 'news' -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("<sfile>:p:h") . "')" diff --git a/plugin/hackernews.vim b/plugin/hackernews.vim index 6e818ab..d6dafdc 100644 --- a/plugin/hackernews.vim +++ b/plugin/hackernews.vim @@ -17,6 +17,17 @@ au! BufRead,BufNewFile *.hackernews set filetype=hackernews " Prevent syntax highlighting issues in long comment threads with code blocks au! BufEnter *.hackernews syntax sync fromstart + +" Set required defaults +if !exists("g:hackernews_stories") + let g:hackernews_stories = 'news' +endif + +if !exists("g:hackernews_marks") + let g:hackernews_marks = {} +endif + + function! HackerNews(...) if a:0 > 0 let available_lists = ['news', 'newest', 'ask', 'show', 'shownew', |
