|
| 1 | +vim-hackernews |
| 2 | +============== |
| 3 | + |
| 4 | +Browse [Hacker News](https://news.ycombinator.com) inside Vim. |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | +Uses [cheeaun's Unofficial Hacker News API](https://github.com/cheeaun/node-hnapi) |
| 11 | +to retrieve home page stories and comments and |
| 12 | +[FUCK YEAH MARKDOWN](http://fuckyeahmarkdown.com) for rendering HTML articles |
| 13 | +as text. |
| 14 | + |
| 15 | + |
| 16 | +Basic Usage |
| 17 | +----------- |
| 18 | + |
| 19 | +* Open the Hacker News front page in Vim by executing the `:HackerNews` command |
| 20 | +* The HackerNews command takes an optional parameter to view items other |
| 21 | + than the top stories on the front page: `ask`, `show`, `shownew`, `jobs`, |
| 22 | + `best`, `active`, `newest`, `noobstories`, `<item id>`, or `<search query>` |
| 23 | +* Press lowercase `o` to open links in Vim |
| 24 | +* Press uppercase `O` to open links in default web browser |
| 25 | +* Numbered lines with story titles on the front page link to the story url |
| 26 | +* Comment lines on the front page link to the comments url |
| 27 | +* Press uppercase `F` to fold current comment thread |
| 28 | +* Press lowercase `u` to go back |
| 29 | +* Press `Ctrl+r` to go forward |
| 30 | +* Execute the `:bd` command to close and remove the Hacker News buffer |
| 31 | + |
| 32 | + |
| 33 | +Enhanced Motions |
| 34 | +---------------- |
| 35 | + |
| 36 | +Uppercase `J` and `K` are mapped to helpful new motions based on what type of |
| 37 | +content is on the screen: |
| 38 | + |
| 39 | +* Move to next/prev item when viewing the front page. (If the cursor is on a |
| 40 | + numbered line with story title the cursor will move to the next/prev numbered |
| 41 | + line with story title. If the cursor is on a comment line it will move to the |
| 42 | + next/prev comment line.) |
| 43 | +* Move to next/prev comment when viewing comments. |
| 44 | +* Move to next/prev paragraph when viewing the text version of articles. |
| 45 | + |
| 46 | + |
| 47 | +Installation |
| 48 | +------------ |
| 49 | + |
| 50 | +##### Pathogen (https://github.com/tpope/vim-pathogen) |
| 51 | +```bash |
| 52 | +git clone https://github.com/ryanss/vim-hackernews ~/.vim/bundle/vim-hackernews |
| 53 | +``` |
| 54 | + |
| 55 | +##### Vundle (https://github.com/gmarik/vundle) |
| 56 | +``` |
| 57 | +Plugin 'ryanss/vim-hackernews' |
| 58 | +``` |
| 59 | + |
| 60 | +##### NeoBundle (https://github.com/Shougo/neobundle.vim) |
| 61 | +``` |
| 62 | +NeoBundle 'ryanss/vim-hackernews' |
| 63 | +``` |
| 64 | + |
| 65 | + |
| 66 | +Running Tests |
| 67 | +------------- |
| 68 | + |
| 69 | +```bash |
| 70 | +$ vim -c Vader! tests.vader |
| 71 | +``` |
| 72 | + |
| 73 | + |
| 74 | +Contributions |
| 75 | +------------- |
| 76 | + |
| 77 | +[Issues](https://github.com/ryanss/vim-hackernews/issues) and |
| 78 | +[Pull Requests](https://github.com/ryanss/vim-hackernews/pulls) are always |
| 79 | +welcome! |
| 80 | + |
| 81 | + |
| 82 | +License |
| 83 | +------- |
| 84 | + |
| 85 | +Code is available according to the MIT License |
| 86 | +(see [LICENSE](https://github.com/ryanss/vim-hackernews/raw/master/LICENSE)). |
0 commit comments