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

Implement a binding for deleting one word forward (maybe C-delete?) #127

Open
osa1 opened this issue Feb 26, 2019 · 7 comments
Open

Implement a binding for deleting one word forward (maybe C-delete?) #127

osa1 opened this issue Feb 26, 2019 · 7 comments
Labels
feature request libtiny_tui Issues/PRs related to the TUI library

Comments

@osa1
Copy link
Owner

osa1 commented Feb 26, 2019

No description provided.

@ghost
Copy link

ghost commented Feb 26, 2019

also perhaps M-d (alt-delete): standard in Emacs and the Bash shell

@osa1
Copy link
Owner Author

osa1 commented Feb 26, 2019

Ah, I wasn't aware of that binding. Indeed if it's the standard then we should use it.

@ghost
Copy link

ghost commented Feb 26, 2019

To expand on that with some random keybinding info:

Shared between bash, Emacs and tiny:

  • C-a/C-e move cursor to beginning of line/end of line
  • C-k delete the rest of the line
  • C-n/C-p (tiny: next/previous tab, which makes sense because input is only one line.) bash/emacs: next/previous line

In Emacs, C-w deletes the selected region, and in web browsers it deletes the current tab. Currently in tiny, C-w deletes one word backwards, like in Bash.

Possible shortcuts:

  • C-t could be a shortcut to insert /join # into the input field, for quickly joining a channel (following the example of opening a new tab in Firefox and Chrome). In Bash, C-t switches the current char with the previous char (not very useful)
  • C-tab could switch to the previous tab that you were in (useful if you /switched or Alt-#ed from a far away tab), which follows the useful shortcut in web browsers (no binding in Bash or Emacs)

Edit: also:

  • C-b/C-f (move forward and backwards 1 char, Bash and Emacs)
  • M-f/M-b (move forwards and backwards 1 word, Bash and Emacs)

@osa1
Copy link
Owner Author

osa1 commented Feb 26, 2019

  • C-tab could switch to the previous tab that you were in (useful if you /switched or Alt-#ed from a far away tab), which follows the useful shortcut in web browsers (no binding in Bash or Emacs)

Which browser does this? I have Chrome and Firefox installed, and they both switch to the next tab instead of the previous tab.

@ghost
Copy link

ghost commented Feb 26, 2019

Ah yes, that's correct. In firefox you have to enable "cycle through tabs in recently used order" apparently.
https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly#w_windows-tabs

@osa1
Copy link
Owner Author

osa1 commented Feb 27, 2019

Ah, one problem with using M for this is that we use M-key for changing tabs, e.g. M-n currently switches to tab #tiny for me, M-u switches to #rust etc.

@ghost
Copy link

ghost commented Feb 27, 2019

I see. Those were just some suggestions, I guess. Maybe long term the user will be able to set their own keybindings after #66

@osa1 osa1 added the libtiny_tui Issues/PRs related to the TUI library label Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request libtiny_tui Issues/PRs related to the TUI library
Projects
None yet
Development

No branches or pull requests

1 participant