6 ms·
ViHN: Vim for Hacker News
- qsantos 3y agotl;dr: I made ViHN [1] to read Hacker News without having to move my hands away from the keyboard. It’s freely available on Firefox [2] and Chrome [3]. [1] https://github.com/qsantos/ViHN/ https://github.com/qsantos/ViHN/ [2] https://addons.mozilla.org/fr/firefox/addon/vihn/ https://addons.mozilla.org/fr/firefox/addon/vihn/ [3] https://chromewebstore.google.com/detail/vihn/cfmccoefeojndmkdmbkgalghikfafdod https://chromewebstore.google.com/detail/vihn/cfmccoefeojndm...
- HL33tibCe7 3y agoI just use vimium, basically never have to use my mouse when browsing HN
- geniium 3y agoAnd Vimium C
- ptrhvns 3y agoI think Vimium C works better than Vimium. It's been so long since I switched that I can't remember exactly why, though.
- ivanjermakov 3y agoI switched last week because its smooth scroll is smoother. I also noticed that Vimium C is better at finding clickable elements for hints.
- keithnz 3y agoone thing I like in Vimium C over Vimium is reload frame. Vimium it would reload the window and I have an older web app that uses frames where reloading the window resets everything back to a particular state and I have to go and reopen the frames.
- surprisetalk 3y agoVimlike also works exceptionally well in Safari on Mac and iOS: [1] https://www.jasminestudios.net/vimlike/ https://www.jasminestudios.net/vimlike/
- letmeinhere 3y agoAnyone know how this compares to Vimari?
- AYoung010 3y agoHaving used both, I personally prefer vimlike —nothing major, have just run into fewer issues.
- t0mislav 3y agoSame here!
- moelf 3y agowhen I hit `F` the url density is too high that it's difficult to tell which is which, how do you navigate differently?
- dj_mc_merlin 3y agoIt's not that high on HN? The left most column is upvote. Then the next button immediately to the right is the link. Next row buttons from left to right are username, comments (via hours link), hide, and comments again (normal link).
- keithnz 3y agoCan be overwhelming at first, but you quickly get used to it.
- yungtriggz 3y agoI love the 'vim for this' trend. does vimium just take care of that for everything?
- jquaint 3y agoYeah! You click links similar as you would with a "fingers" style plugin. i.e. f (letter combo). I use Vimium C and haven't looked back.
- SilasX 3y agoThe only problem I have is when I use the search (which, I know, is not HN itself but a separate service), it won't pick up the dropdown options as clickable.
- imwally 3y agoThere’s Vimari for the dozens of us that use Safari.
- qsantos 3y agoI use Vimium as well! It's very frustrating when I need to reach for the mouse to navigate a website.
- fp64 3y agoThere should be a couple command line tools to read HN, this way you can even stay in the terminal and don't need to switch to the browser Switching to my browser, navigating to HN, and checking the first page (and going back if nothing interests me) already does not require me to touch my mouse and can be done with very few keystrokes. Typically, I visit HN when I'm waiting for something to complete or similar, though, in which case I anyways happily move my hand to the mouse, as I'll be _browsing_ for a bit
- mrusme 3y agoI don't often comment on HN, but when I do, it's a shameless plug[1]. :-) [1]: http://neonmodem.com http://neonmodem.com
- funks_ 3y agoThere is HNTerm [1], which also has an online demo [2]. [1]: https://github.com/ggerganov/hnterm https://github.com/ggerganov/hnterm [2]: https://hnterm.ggerganov.com https://hnterm.ggerganov.com
- doix 3y agoIs it really vim if you don't have modes and can't combine operations ;p. Everything is pretty much single keystrokes that don't combine in any meaningful way. The only "vim" thing about it is h/j/k/l. Thing like collapsing don't use vim keys z(a|o|c), going to different places doesn't use g<thing>. There's some weird scroll into view code as well, holding j to just scroll down buffers up a bunch of scrolls and then scrolls all at once. I'm guessing it's a side effect of smooth scrolling or something. To avoid being a typical grumpy HN commentator, nice work :).
- qsantos 3y agoThanks! And I agreed that this is not “pure” Vim. But I did need to find a compromise. There is little point in having an “insert” mode, like Vimium does, since I am targeting a very specific website and not overriding any existing shortcut (AFAICT). If you think it's important to you, I might consider implementing custom key bindings so that you can use with “pure” Vim shortcuts! Regarding the scrolling, it could be two things: 1. I do not update the address bar on every key press, to avoid some kind of rate limitation I encountered when I did so initially. Instead, there is a very short delay so before it happens. But the viewport should still scroll immediately. 2. If it's smooth scrolling, there is actually a toggle you can change in the extension settings. If you still have the behavior without smooth scrolling, I would be curious to know more, to see if I can make the experience more pleasant.
- doix 3y agoI can confirm it was indeed caused by smooth scrolling. I didn't realize there was a setting.
- surprisetalk 3y agoY'all may be interested in my HNTV script: curl -s 'https://news.ycombinator.com/from?site=youtube.com' \ | egrep -o 'https?://www.youtube.com[^"]+' \ | mpv --playlist=- \ --speed=1.5 \ --ytdl-format='bestvideo[height<=?720]+bestaudio/best' [1] https://taylor.town/hntv https://taylor.town/hntv
- tra3 3y agoIs there a YouTube API tool? Would love to create a YouTube playlist so that I can watch this on the TV.
- surprisetalk 3y agoI think you can stream stuff from VLC on the TV. My guess is that you could set up a proxy sort of thing to generate the stream on the fly. Alternatively, you could create a bot to throw every YouTube link posted to HN in a playlist, which you could open up in the YouTube app!
- yaj54 3y agoNice. Reminds me of a project I built a long time ago: https://yahnd.com/theater/?t=week https://yahnd.com/theater/?t=week. Makes me want to update it to have all the urls on the listing page so I can use your player technique on it. Or throw em in a yt playlist.
- 0x008 3y agoI use https://haxplore.com https://haxplore.com which has a very nice way to navigate the nested conversations in my opinion.
- qsantos 3y agoI did not know of Haxplore, thanks!
- gloosx 3y agoBut... You can use $> lynx -vikeys from a terminal emulator inside the vim itself! That way you dont even have to invent anything or leave vim! (posted from vim btw)
- k3vinw 3y agoInteresting. Are you running lynx inside a vim terminal buffer?
- ykonstant 3y agoTo wit: https://i.redd.it/p5h7ongm51541.jpg https://i.redd.it/p5h7ongm51541.jpg The rightmost buffer is `w3m` browsing arXiv.
- AlecSchueler 3y agoIn vim?
- ykonstant 3y agoYes, the entire screen you see is Vim.
- gloosx 3y agoYeah, the most interesting part is that lynx is in a vim terminal buffer, and then the same vim is opened from lynx inside the almighty vim terminal buffer to edit this post textarea ;)
- ykonstant 3y agow3m which I am using also seems able to browse HN; however, usually people want seamless navigation between HN and various links, so a graphical browser is a must. Qutebrowser is a good choice for those who enjoy keyboard navigation.
- gloosx 3y ago
- projektfu 3y agoHN reads easily on eww-mode and with evil-mode you get Vim keys. There's also eww-lnum with quick link numbering.
- _emacsomancer_ 3y agothere's also: https://github.com/clarete/hackernews.el https://github.com/clarete/hackernews.el
- k3vinw 3y agoAs a fan of vi/vim keyboard navigation everywhere, I’m always intrigued to see how other people solve this. But if you’re looking for a more generalized approach, I can recommend a mix of vimium and w3m with vim key bindings.
- komali2 3y agoSimple man: I see a screen with a window manager with gaps, I scream. We're paying thousands of dollars for machines with high resolution displays, why don't people use the whole display???
- whackx 3y agoWhy not using keyboard controls for web pages in general? I tried multiple solutions for browsing the web and using vim binding to do so over the years. Some of them for extended periods of time, including Tridactyl, Vimium and others. My favorite by far is Qutebrowser because of its default commands and integration of them, for example moving between tabs, editing or copying URLs or configuration is pretty easy.
- qsantos 3y agoI do! I use Vimium C for general browsing. But, considering the time I spend on Hacker News, I needed something to optimize my procrastination even further!
- Ringz 3y agoI use Surfingkeys [1] with Firefox (also for Chrome) for this. Last time I looked it was by far the best solution and superior to vimium. [1]: https://github.com/brookhong/Surfingkeys https://github.com/brookhong/Surfingkeys
- ptrhvns 3y agoIn what ways is it superior to Vimium?
- Ringz 3y agoSurfingkeys has much more keyboard shortcuts, implemented vimedit for input fields, better search, sessions...
- phaedrix 3y agoYou haven't used Tridactyl then. https://github.com/tridactyl/tridactyl https://github.com/tridactyl/tridactyl
- Ringz 3y agoI have! And I liked it! But Surfingkeys has 95% of the functionality of Tridactyl, but but does not need a troubleshoot guide like Tridactyl. Moreover, Surfingkeys implements a better search function on websites. With Surfingkeys, you also don't need to install an external application to work in input masks with Vim, as Surfingkeys has a Vim implementation on board that is completely sufficient for filling out input masks. I also like Surfingkeys' visual mode.
- throwaway_08932 3y ago> When GNOME Shell happened, I was forced to go looking for a new window manager. I ended up installing Ratpoison. Wow, I used Ratpoison around 20 years ago. SunOS labs in school used some window manager I couldn't stand (don't remember which) and I saw a classmate with basically no window chrome on their display, and was intrigued. They helped me compile it (no small feat given our resource constraints) and off I went, until my hand started to cramp a year later from hitting ctrl-t so much. I switched to ion for awhile, and then ended up scavenging a linux box to do assignments from home. I'm happy to see some folks still holding firm on the "no-pointer" front.
- arnorhs 3y agoRe >I never quite liked the idea of trying to remember what comments the user might have seen. One way to do this by simply storing the latest comment's timestamp, and then you know that all the comments with a greater timestamp are newer
- anthk 3y agolynx -vikeys gopher://hngopher.com
- igorguerrero 3y agoSwitched to this immediately, great HN tv too hah