ox
ox copied to clipboard
Advanced keyboard navigation
Is your feature request related to a problem? Please describe. Cannot edit text using muscle memory, because some navigation keys are not working.
Describe the solution you'd like
Ctrl+Left/Right - jump word to left/right. Shift+Left/Right - extend selection by char to left/right Shift+Up/Down - extend selection by line up/down Ctrl+Shift+Left/Right - extend selection by word to left/right Ctrl+C - copy selection to buffer Ctrl-V - paste selection from buffer Ctrl+X - cut selection to buffer Ctrl-T - new tab Ctrl-H - search and replace
mcedit:
F1 - help screen Ctrl-F - put selection into file. Default file name "~/.config/ox/clipboard". Shift-F5 - paste from file. Default file name "~/.config/ox/clipboard". F3 - start selection mode for cases when Shift doesn't work. F3, or Ctrl-F, Ctrl-C, Ctrl-X, Delete to end. Shift-F3 - start rectangle selection mode. F3, or Ctrl-F, Ctrl-C, Ctrl-X, Delete to end. Ctrl-L - refresh screen Ctrl-Y - delete line under cursor F10 - show editor menu F11 - show user menu with external filters or commands, such as "sort" or "date". For filter, current selection or whole file is sent to stdin and then replaced by stdout. A command output is just pasted under cursor. Command may prompt for command line options (e.g. "sed").
Describe alternatives you've considered
https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts#Text_editing
I might add an observation / request:
Pressing "Left" at the beginning of a line should navigate the cursor to the back of the previous line. Pressing "Right" at the end of a line should navigate the cursor to the front of the next line.
I'll be working on this over the next week, adding the line wrapping option shouldn't be too difficult, Ox originally had it but I found it annoying and removed it so I'll be adding an option in the configuration file to enable it should the user want to. As for the extra keyboard shortcuts, I'll be rewriting the entire editor in Crossterm which I hope will provide much better access to those key bindings as the current library I'm using, termion, lacks many features including Ctrl+Shift key bindings.I'll try to keep you guys posted.
It's come to my attention that the library I'm using doesn't support Ctrl+Shift keys and multiple modifiers, I've added an issue to the repository of the library and hopefully it'll be added at some point, but for now, it looks like I might have to skip adding this for now and add it later when the library has support for it.
@curlpipe Drop link to issue, please.
https://github.com/crossterm-rs/crossterm/issues/515
I have just released 0.2.7 and added more available keybindings such as the arrow keys and the function keys too. For now, this issue will remain open until we can get a conclusion on the status of those Ctrl+Shift keys.
Please can you add "Delete" key to delete the characters to the right of the cursor ? Thanks