from Hacker News

ViHN: Vim for Hacker News

by qsantos on 2/25/24, 6:44 AM with 57 comments

  • by surprisetalk on 2/26/24, 12:59 PM

    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<=?720]+bestaudio/best'
    
    [1] https://taylor.town/hntv
  • by HL33tibCe7 on 2/26/24, 12:06 PM

    I just use vimium, basically never have to use my mouse when browsing HN
  • by gloosx on 2/26/24, 1:09 PM

    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)
  • by whackx on 2/26/24, 3:36 PM

    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.
  • by throwaway_08932 on 2/26/24, 6:00 PM

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

  • by k3vinw on 2/26/24, 1:39 PM

    As 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.
  • by doix on 2/26/24, 12:44 PM

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

  • by komali2 on 2/26/24, 2:51 PM

    Simple 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???

  • by 0x008 on 2/26/24, 1:04 PM

    I use https://haxplore.com which has a very nice way to navigate the nested conversations in my opinion.
  • by qsantos on 2/25/24, 7:16 AM

    tl;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/

    [2] https://addons.mozilla.org/fr/firefox/addon/vihn/

    [3] https://chromewebstore.google.com/detail/vihn/cfmccoefeojndm...

  • by Ringz on 2/26/24, 4:56 PM

    I 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

  • by arnorhs on 2/26/24, 8:25 PM

    Re >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

  • by anthk on 2/26/24, 8:36 PM

         lynx -vikeys gopher://hngopher.com
  • by projektfu on 2/26/24, 1:31 PM

    HN reads easily on eww-mode and with evil-mode you get Vim keys. There's also eww-lnum with quick link numbering.
  • by igorguerrero on 2/26/24, 9:53 PM

    Switched to this immediately, great HN tv too hah
  • by fp64 on 2/26/24, 12:29 PM

    There 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