Settings

Theme

Ask HN: Could we have Vim key bindings in HN?

2 points by cupcakestand 8 years ago · 3 comments · 1 min read


Especially on smartphones it would much easier to edit text and navigate with Vim bindings. I think the Ace Editor and Codemirror support Vim bindings.

antouank 8 years ago

Could you open an issue here ( https://github.com/AntouanK/hni-ui/issues ) with a small proposal of how that would work? I'm re-writing in Elm the front-end for my HN app, so that would be an interesting feature to add.

Edit: I thought you meant navigating the site. You only meant the text editing part though, right?

  • cupcakestandOP 8 years ago

    Right. To navigate the site you can use browser extensions like Vimium.

    There is even an extension for using Vim bindings in HTML text areas but this one doesn't work on mobile and also on desktop it's a bit clumsy.

    I would just exchange the current HN text area with some HTML editor with Vim bindings such as Codemirror.

    • antouank 8 years ago

      I'm rewriting it in Elm right now, so I want to avoid any js library. Also, the HN API doesn't allow auth, so you cannot submit or edit posts from any other app.

      But why would you want this? I mean do you write lengthy posts? Or do you post that often? I can imagine a very small percentage of users would use that feature.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection