edit icon indicating copy to clipboard operation
edit copied to clipboard

[feature] Add nano's "ALT+<" and "ALT+>" key-bindings for file switching.

Open skywind3000 opened this issue 5 months ago • 2 comments

Nano has got these key-binds to cycle current file:

  • ALT+< or ALT+,: go to the previous file.
  • ALT+> or ALT+.: go to the next file

I found that I can use CTRL+P to switch current file in edit, but each time it requires four or more key strokes:

  • CTRL
  • P
  • UP/DOWN (one or more times)
  • ENTER

I need to press my keyboard 4-5 times to jump to another file.

while ALT+< and ALT+> only require two key strokes: ALT -> , or .

It is a faster way to cycle files if there are less than 5 files opening at the same time.

And two menu items can be added too:

  • View -> Next file (N) ALT+>
  • View -> Previous file (P) ALT+<

Is it possible to add this key bindings?

skywind3000 avatar Jun 26 '25 07:06 skywind3000

This project follows VS Code key bindings for the default configuration. It would otherwise be weird if two Microsoft code editors have different bindings. VS Code uses Ctrl+PageUp/Down for cycling between tabs and we should use those bindings as well by default. I'd be happy to accept a PR for that.

Then, once we have settings, you'll hopefully be able to add custom key bindings like this. 🙂

lhecker avatar Jun 26 '25 15:06 lhecker

Don't really know how to code in rust, wish I could.

skywind3000 avatar Jun 27 '25 09:06 skywind3000