rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.63k stars 12.48k forks source link

Add vi movement keys for navigating rust documentation #44964

Open cherryman opened 6 years ago

cherryman commented 6 years ago

Adding vi movements keys would make it much faster to navigate the documentation while programming, since it would avoid having to resort to the mouse or arrow keys as frequently. Moving hands around can be annoying and is the reason many optimise their setups to avoid doing so.

est31 commented 6 years ago

It will help the vim fans and it would confuse everyone else.

Javyre commented 6 years ago

GitHub has some vi inspired shortcuts and I don't see people complaining or being confused.

https://help.github.com/articles/using-keyboard-shortcuts/

Javyre commented 6 years ago

Another example: Godoc.org image

steveklabnik commented 6 years ago

Nominating to talk about this at a future doc meeting.

GuillaumeGomez commented 6 years ago

... Why not? ... (I'm super doubtful about the usefulness of this feature but I like useless things so why not haha.)

steveklabnik commented 6 years ago

We talked about this at the docs team meeting today. The outcome was, basically, everyone is uncomfortable with framing this as "vim compatible", in the sense that we wouldn't ever be fully compatible with vim. But we already have some keyboard shortcuts, and adding more isn't a terrible idea. If we can come up with a specific list of ones, we can discuss those, but defining the scope here first is important.

cherryman commented 6 years ago

The goal here is to allow for faster and smoother movement in documentation, not necessarily to be "vim compatible"

My main suggestion is to add hjkl for moving through search results and methods, although this would require the search box to be de-selected after searches. I don't think is too much of a concern since it can easily be selected using "s", but that's just me.

If anyone has any suggestions for vi-related keybinds that would make navigation easier, it would be appreciated. My goal here to remove the hassle involved in moving the arm between the mouse and the keyboard, so if there are keybinds unrelated to vi that would allow that, they would be perfectly fine.

Javyre commented 6 years ago

thought it would be relevant to mention here that google also implements vim-like bindings https://support.google.com/drive/answer/2563044?hl=en

maybe we could draw some inspiration from hese binds?

PramodBisht commented 6 years ago

Or we can also use VI based add-ons available for browsers.