NixOS / nixos-search

Search NixOS packages and options
https://search.nixos.org
MIT License
383 stars 98 forks source link

Use / to search #762

Closed dev-ardi closed 1 month ago

dev-ardi commented 2 months ago

https://github.com/NixOS/nixos-homepage/issues/1382

I don't want to have to use my mouse to select the search box! This is mainly for https://search.nixos.org/ but it could also be applied to the wiki and other places.

In most places you can use / to search. Github, gitlab, google search, rustdoc (soon)... It's the default vi key for search so I suggest using that.

thecijal commented 2 months ago

It would be pretty cool to get into the search box by typing /. I also think <Ctrl>+<K> would be awesome.

dev-ardi commented 2 months ago

It would be pretty cool to get into the search box by typing /. I also think <Ctrl>+<K> would be awesome.

Once you have support for once it's probably trivial to add it for another hotkey. Curious, why Ctrl+k?

thecijal commented 2 months ago

Because Ctrl+k is a very common one as well as /. Just a few examples: