Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced keyboard navigation #44

Open
vlisivka opened this issue Nov 3, 2020 · 7 comments
Open

Advanced keyboard navigation #44

vlisivka opened this issue Nov 3, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@vlisivka
Copy link

vlisivka commented Nov 3, 2020

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

@r-chris
Copy link

r-chris commented Nov 3, 2020

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.

@curlpipe curlpipe added the enhancement New feature or request label Nov 6, 2020
@curlpipe
Copy link
Owner

curlpipe commented Nov 8, 2020

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.

@curlpipe
Copy link
Owner

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.

@vlisivka
Copy link
Author

@curlpipe Drop link to issue, please.

@curlpipe
Copy link
Owner

@curlpipe
Copy link
Owner

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.

@duboiss
Copy link

duboiss commented Nov 25, 2020

Please can you add "Delete" key to delete the characters to the right of the cursor ? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants