diff options
| author | ryanss | 2015-04-03 23:59:00 -0400 |
|---|---|---|
| committer | ryanss | 2015-04-03 23:59:00 -0400 |
| commit | 704f5a5970b8bd7b346d49cd66cbf132e3870610 (patch) | |
| tree | 6217c01ec5865ad8ea49af56f28411530c8f0d80 /plugin | |
| parent | 2960a85e7498a22b53e658449b88a237008194e8 (diff) | |
| download | vim-hn-704f5a5970b8bd7b346d49cd66cbf132e3870610.tar.gz | |
Move default settings from ftplugin to plugin
:HackerNews commands needs `g:hackernews_stories` set before ftplugin code
is executed.
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/hackernews.vim | 11 |
1 files changed, 11 insertions, 0 deletions
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', |
