-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add ^F and ^B readline bindings and modify vi-mode binding. #405
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
Conversation
Most of the bindings for readline are already included in the zsh
configuration except for forward and backward character. For those used
to the full suite, it would be nice include ``^F`` and ``^B`` as well.
The current vi-mode mode binding of jj is troublesome for those who
either have jj in their github username or email address. One of the
most biggest problems is when copying a git repo into the terminal and
having it clipped. For example copying my repo name to git clone yields:
git@github.com:ngholtz/dotfiles.git
In addition the buffer after typing a j means that I need to wait a
second after typing j or else it will enter vi-mode which can be a bit
annoying.
I propose that the vi-mode key just be ``^J`` to prevent both of those
issues.
Lastly, just a minor change to the rbenv init command to fix issues
where $SHELL is bin/bash causing the following message:
/completions/rbenv.bash:14: command not found: complete
Fix suggested [here](rbenv/rbenv#239).
|
One minor issue to discuss here is the use of |
|
Ah good point. I didn't notice that |
|
@jjlangholtz, sorry to rain on your parade again, but one other conflict I see here when I was testing your proposal out is that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the person who added this: noooooooooo!
(But really a thoughtbotter who uses these dotfiles and uses the jj binding should weigh in.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it stands, I think using ^J here is a deal-breaker, as it clashes with vim-tmux-navigator and our vim pane navigation shortcuts. If there's another binding that doesn't conflict with core functionality I think it's worth discussing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esc still works. We could probably remove jj, and leave it up to local overrides (some people use jk-smash).
|
Any ideas here? If we don't have a new solution that doesn't break |
|
Is vim-tmux-navigator part of thoughtbot/dotfiles? I'm not up to date with that plugin and what it offers. |
|
Sorry, vim-tmux-navigator isn't in our dotfiles, but our vim pane jumping shortcuts use the same mappings (and I suspect many of our dotfiles users are using it, as it's a @christoomey joint), allowing tmux users to treat vim and tmux panes in the same fashion when navigating between them. That means that |
|
I'm not a user of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like it should be in it's own commit/PR.
|
I'm 👍 on adding the two keybindings to support readline |
|
@jjlangholtz, can you trim this PR down to only:
We'll do the rbenv change in a separate PR after #426 is resolved. If you don't get to it this week I'll submit a streamlined PR. |
As reported in #405, the `jj` keybinding is problematic for some users as it enters vi-mode whenever a user types a string that actually contains two consecutive `j`s. While consecutive `j`s are unusual in English, usernames with consecutive `j`s such as that of the contributor who reported the problem (@jjlangholtz) are common enough that we shouldn't force this mapping on users. Users can add their own keybinding to their local configuration or use the already-provided `Esc` binding to enter vi-mode. PR #405 contains other keybinding changes that we don't want to apply, this commit addresses only the `jj` binding.
|
RIP |
As reported in thoughtbot#405, the `jj` keybinding is problematic for some users as it enters vi-mode whenever a user types a string that actually contains two consecutive `j`s. While consecutive `j`s are unusual in English, usernames with consecutive `j`s such as that of the contributor who reported the problem (@jjlangholtz) are common enough that we shouldn't force this mapping on users. Users can add their own keybinding to their local configuration or use the already-provided `Esc` binding to enter vi-mode. PR thoughtbot#405 contains other keybinding changes that we don't want to apply, this commit addresses only the `jj` binding.
As reported in thoughtbot#405, the `jj` keybinding is problematic for some users as it enters vi-mode whenever a user types a string that actually contains two consecutive `j`s. While consecutive `j`s are unusual in English, usernames with consecutive `j`s such as that of the contributor who reported the problem (@jjlangholtz) are common enough that we shouldn't force this mapping on users. Users can add their own keybinding to their local configuration or use the already-provided `Esc` binding to enter vi-mode. PR thoughtbot#405 contains other keybinding changes that we don't want to apply, this commit addresses only the `jj` binding.
As reported in thoughtbot#405, the `jj` keybinding is problematic for some users as it enters vi-mode whenever a user types a string that actually contains two consecutive `j`s. While consecutive `j`s are unusual in English, usernames with consecutive `j`s such as that of the contributor who reported the problem (@jjlangholtz) are common enough that we shouldn't force this mapping on users. Users can add their own keybinding to their local configuration or use the already-provided `Esc` binding to enter vi-mode. PR thoughtbot#405 contains other keybinding changes that we don't want to apply, this commit addresses only the `jj` binding.
As reported in thoughtbot#405, the `jj` keybinding is problematic for some users as it enters vi-mode whenever a user types a string that actually contains two consecutive `j`s. While consecutive `j`s are unusual in English, usernames with consecutive `j`s such as that of the contributor who reported the problem (@jjlangholtz) are common enough that we shouldn't force this mapping on users. Users can add their own keybinding to their local configuration or use the already-provided `Esc` binding to enter vi-mode. PR thoughtbot#405 contains other keybinding changes that we don't want to apply, this commit addresses only the `jj` binding.
As reported in thoughtbot#405, the `jj` keybinding is problematic for some users as it enters vi-mode whenever a user types a string that actually contains two consecutive `j`s. While consecutive `j`s are unusual in English, usernames with consecutive `j`s such as that of the contributor who reported the problem (@jjlangholtz) are common enough that we shouldn't force this mapping on users. Users can add their own keybinding to their local configuration or use the already-provided `Esc` binding to enter vi-mode. PR thoughtbot#405 contains other keybinding changes that we don't want to apply, this commit addresses only the `jj` binding.
As reported in thoughtbot#405, the `jj` keybinding is problematic for some users as it enters vi-mode whenever a user types a string that actually contains two consecutive `j`s. While consecutive `j`s are unusual in English, usernames with consecutive `j`s such as that of the contributor who reported the problem (@jjlangholtz) are common enough that we shouldn't force this mapping on users. Users can add their own keybinding to their local configuration or use the already-provided `Esc` binding to enter vi-mode. PR thoughtbot#405 contains other keybinding changes that we don't want to apply, this commit addresses only the `jj` binding.
Most of the bindings for readline are already included in the zsh
configuration except for forward and backward character. For those used
to the full suite, it would be nice include
^Fand^Bas well.The current vi-mode mode binding of jj is troublesome for those who
either have jj in their github username or email address. One of the
most biggest problems is when copying a git repo into the terminal and
having it clipped. For example copying my repo name to git clone yields:
In addition the buffer after typing a j means that I need to wait a
second after typing j or else it will enter vi-mode which can be a bit
annoying.
I propose that the vi-mode key just be
^Jto prevent both of thoseissues.
Lastly, just a minor change to the rbenv init command to fix issues
where $SHELL is bin/bash causing the following message:
Fix suggested here.