Live data from Hacker News

ViHN: Vim for Hacker News

qsantos.fr

51–58 of 58 posts

Re: ViHN: Vim for Hacker News

#51
post #15

I just use vimium, basically never have to use my mouse when browsing HN

when I hit `F` the url density is too high that it's difficult to tell which is which, how do you navigate differently?

Can be overwhelming at first, but you quickly get used to it.

Re: ViHN: Vim for Hacker News

#52

Y'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 [1] https://taylor.town/hntv

Nice. Reminds me of a project I built a long time ago: 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.

Re: ViHN: Vim for Hacker News

#53
post #11

But... 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)

w3m 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.

I would say not graphical but a javascript browser is a must if you want _various_ links, I know one for the terminal capable of this called browsh

Re: ViHN: Vim for Hacker News

#55
post #20

Why 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.

I 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!

Re: ViHN: Vim for Hacker News

#56
post #6

Is 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 . There's some weird scroll into view code as well, holding j to just scroll down buffers up a bunch of scrolls and then scroll…

Thanks!

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.

Re: ViHN: Vim for Hacker News

#58
post #56
post #6

Is 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 . There's some weird scroll into view code as well, holding j to just scroll down buffers up a bunch of scrolls and then scroll…

Thanks! 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…

I can confirm it was indeed caused by smooth scrolling. I didn't realize there was a setting.
Post reply on HN