Skip to content

Commit eb0fffb

Browse files
committed
Adding files
0 parents  commit eb0fffb

11 files changed

+914
-0
lines changed

CHANGES

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Vim-HackerNews Changelog
2+
========================
3+
4+
5+
Version 0.2
6+
-----------
7+
8+
Released April 26, 2015
9+
10+
- Add Python 3 support
11+
- Add additional motions to improve browsing of story lists, comments, articles
12+
- Add comment thread folding
13+
- Add ability to display specific HackerNews lists (top, ask, show, etc)
14+
- Handle all HackerNews item types properly (poll, job, etc)
15+
- Save cursor position when moving back/forward
16+
- Add highlighting of OP username in comment titles
17+
- Do not load python code until first :HackerNews command
18+
- Timeout HTTP requests after 5 seconds instead of hanging Vim
19+
- Improve HTTP error information
20+
- Add units tests with Vader.vim
21+
- Add Travis CI integration
22+
- Lots of syntax fixes and improvements
23+
- Dozens of other bug fixes and improvements
24+
25+
26+
Version 0.1.1
27+
-------------
28+
29+
Released February 7, 2015
30+
31+
- Fix "job" type items without a `domain` key in API
32+
33+
34+
Version 0.1
35+
-----------
36+
37+
Released February 7, 2015
38+
39+
- Initial release

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2015 <[email protected]>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
vim-hackernews
2+
==============
3+
4+
Browse [Hacker News](https://news.ycombinator.com) inside Vim.
5+
6+
![Hacker News Front Page in Vim](https://github.com/ryanss/vim-hackernews/raw/master/screenshots/vim-hackernews-home.png)
7+
8+
![Hacker News Comments in Vim](https://github.com/ryanss/vim-hackernews/raw/master/screenshots/vim-hackernews-item.png)
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)).

doc/hackernews.txt

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
*hackernews.txt* Browse HackerNews inside Vim *hackernews*
2+
3+
Author: ryanss <[email protected]>
4+
Website: https://github.com/ryanss/vim-hackernews
5+
License: MIT (see LICENSE file)
6+
Version: 0.3-dev
7+
8+
9+
BASIC USAGE *hackernews-usage*
10+
11+
* Open the Hacker News front page in Vim by executing the `:HackerNews` command
12+
* The HackerNews command takes an optional parameter to view items other
13+
than the top stories on the front page:
14+
* `:HackerNews ask`
15+
* `:HackerNews show`
16+
* `:HackerNews shownew`
17+
* `:HackerNews jobs`
18+
* `:HackerNews best`
19+
* `:HackerNews active`
20+
* `:HackerNews newest`
21+
* `:HackerNews noobstories`
22+
* Press lowercase `o` to open links in Vim
23+
* Press uppercase `O` to open links in default web browser
24+
* Numbered lines with story titles on the front page link to the story url
25+
* Comment lines on the front page link to the comments url
26+
* Press uppercase `F` to fold current comment thread
27+
* Press lowercase `u` to go back
28+
* Press `Ctrl+r` to go forward
29+
* Execute the `:bd` command to close and remove the Hacker News buffer
30+
31+
32+
ENHANCED MOTIONS *hackernews-motions*
33+
34+
Uppercase `J` and `K` are mapped to helpful new motions based on what type of
35+
content is on the screen:
36+
37+
* Move to next/prev item when viewing the front page. (If the cursor is on a
38+
numbered line with story title the cursor will move to the next/prev numbered
39+
line with story title. If the cursor is on a comment line it will move to the
40+
next/prev comment line.)
41+
* Move to next/prev comment when viewing comments.
42+
* Move to next/prev paragraph when viewing the text version of articles.
43+
44+
45+
COMMANDS *hackernews-commands*
46+
47+
:HackerNews Open Hacker News front page stories in Vim
48+
49+
50+
ABOUT *hackernews-about*
51+
52+
Grab the latest version or report a bug on GitHub:
53+
54+
https://github.com/ryanss/vim-hackernews

0 commit comments

Comments
 (0)