summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorryanss2015-09-05 23:59:00 -0400
committerryanss2015-09-05 23:59:00 -0400
commitdb9dae9db16473b860c0a1b7ae3756f1a8781f5a (patch)
tree36e537c5b5e3b0cd7bbaa8c33527b909fb71ed5a /plugin
parentb4f251bf4ba95d6d9c1b03117274a3470588e5f8 (diff)
downloadvim-hn-db9dae9db16473b860c0a1b7ae3756f1a8781f5a.tar.gz
Add basic search
Plugin will now display search results from Algolia search API when optional argument passed to `:HackerNews` command is not an alternative page name (ask, show, etc) or item id. Currently only sorted by popularity with no ability to sort other ways. Close #26
Diffstat (limited to 'plugin')
-rw-r--r--plugin/hackernews.vim2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugin/hackernews.vim b/plugin/hackernews.vim
index cb0bff1..1958e3e 100644
--- a/plugin/hackernews.vim
+++ b/plugin/hackernews.vim
@@ -28,6 +28,8 @@ endif
function! HackerNews(...)
if a:0 > 0
let g:hackernews_arg = a:1
+ else
+ let g:hackernews_arg = ""
endif
execute "edit .hackernews"
normal! gg