https://github.com/adelarsq/vim-hackernews
Hacker News plugin for Vim 📰💙💛🤍💚
https://github.com/adelarsq/vim-hackernews
blacklivesmatter hacker-news neovim nowar vim
Last synced: about 1 year ago
JSON representation
Hacker News plugin for Vim 📰💙💛🤍💚
- Host: GitHub
- URL: https://github.com/adelarsq/vim-hackernews
- Owner: adelarsq
- License: mit
- Created: 2018-02-20T00:59:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-24T02:56:40.000Z (about 6 years ago)
- Last Synced: 2024-10-30T10:40:28.338Z (over 1 year ago)
- Topics: blacklivesmatter, hacker-news, neovim, nowar, vim
- Language: Python
- Homepage:
- Size: 463 KB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES
- License: LICENSE
Awesome Lists containing this project
README
vim-hackernews
==============
Browse [Hacker News](https://news.ycombinator.com) inside Vim. Fork from [vim-hackernews](https://vim.sourceforge.io/scripts/script.php?script_id=5108) which is no longer maintained.


Uses [cheeaun's Unofficial Hacker News API](https://github.com/cheeaun/node-hnapi)
to retrieve home page stories and comments and
[FUCK YEAH MARKDOWN](http://fuckyeahmarkdown.com) for rendering HTML articles
as text.
Basic Usage
-----------
* Open the Hacker News front page in Vim by executing the `:HackerNews` command
* 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`, ``, or ``
* Press lowercase `o` to open links in Vim
* Press uppercase `O` to 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 `F` to fold current comment thread
* Press lowercase `u` to go back
* Press `Ctrl+r` to go forward
* Execute the `:bd` command 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)
```bash
git clone https://github.com/adelarsq/vim-hackernews ~/.vim/bundle/vim-hackernews
```
##### Vundle (https://github.com/gmarik/vundle)
```
Plugin 'adelarsq/vim-hackernews'
```
##### NeoBundle (https://github.com/Shougo/neobundle.vim)
```
NeoBundle 'adelarsq/vim-hackernews'
```
Running Tests
-------------
```bash
$ vim -c Vader! tests.vader
```
Contributions
-------------
[Issues](https://github.com/adelarsq/vim-hackernews/issues) and
[Pull Requests](https://github.com/adelarsq/vim-hackernews/pulls) are always
welcome!
License
-------
Code is available according to the MIT License
(see [LICENSE](https://github.com/adelarsq/vim-hackernews/raw/master/LICENSE)).