vim-hackernews
vim-hackernews copied to clipboard
Hacker News plugin for Vim (formerly ryanss/vim-hackernews)
vim-hackernews

Browse Hacker News inside Vim. Fork of vim-hackernews which is no longer maintained.


Uses cheeaun's Unofficial Hacker News API to retrieve home page stories and comments and FUCK YEAH MARKDOWN for rendering HTML articles as text.
Basic Usage
- Open the Hacker News front page in Vim by executing the
:HackerNewscommand - The HackerNews command takes an optional parameter to view items other
than the top stories on the front page:
ask,show,shownew,jobs,best,active,newest,noobstories,<item id>, or<search query> - Press lowercase
oto open links in Vim - Press uppercase
Oto open links in default web browser - Numbered lines with story titles on the front page link to the story url
- Comment lines on the front page link to the comments url
- Press uppercase
Fto fold current comment thread - Press lowercase
uto go back - Press
Ctrl+rto go forward - Execute the
:bdcommand to close and remove the Hacker News buffer
Enhanced Motions
Uppercase J and K are mapped to helpful new motions based on what type of
content is on the screen:
- Move to next/prev item when viewing the front page. (If the cursor is on a numbered line with story title the cursor will move to the next/prev numbered line with story title. If the cursor is on a comment line it will move to the next/prev comment line.)
- Move to next/prev comment when viewing comments.
- Move to next/prev paragraph when viewing the text version of articles.
Installation
Pathogen (https://github.com/tpope/vim-pathogen)
git clone https://github.com/dansomething/vim-hackernews ~/.vim/bundle/vim-hackernews
Vundle (https://github.com/gmarik/vundle)
Plugin 'dansomething/vim-hackernews'
vim-plug (https://github.com/junegunn/vim-plug)
Plug 'dansomething/vim-hackernews'
NeoBundle (https://github.com/Shougo/neobundle.vim)
NeoBundle 'dansomething/vim-hackernews'
Running Tests
$ vim -c Vader! tests.vader
Contributions
Issues and Pull Requests are always welcome!
License
Code is available according to the MIT License (see LICENSE).