Skip to content

Conversation

@jjlangholtz
Copy link

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.

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).
@geoffharcourt
Copy link
Collaborator

One minor issue to discuss here is the use of ^B as the new prefix key for tmux. I guess folks can press it twice, but it will be blocked for a single press for tmux users.

@jjlangholtz
Copy link
Author

Ah good point. I didn't notice that C-b is the new tmux prefix. Personally I have been using C-space for tmux to keep it similar to my vim leader " ".

@geoffharcourt
Copy link
Collaborator

@jjlangholtz, sorry to rain on your parade again, but one other conflict I see here when I was testing your proposal out is that ^j is a common mapping used with vim-tmux-navigator so that moving down a pane or a tmux split is the same keystroke.

Copy link
Contributor

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.)

Copy link
Collaborator

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.

Copy link
Contributor

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).

@geoffharcourt
Copy link
Collaborator

Any ideas here? If we don't have a new solution that doesn't break vim-tmux-navigator and company I'm going to close the ticket.

@croaky
Copy link
Contributor

croaky commented Oct 7, 2015

Is vim-tmux-navigator part of thoughtbot/dotfiles? I'm not up to date with that plugin and what it offers.

@geoffharcourt
Copy link
Collaborator

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 ^h, ^j, ^k, ^l mappings are likely to already be in use in tmux, so can't be mapped for zsh. (I can press ^l and move one pane left whether that's vim or tmux.

@geoffharcourt
Copy link
Collaborator

I'm not a user of the jj mapping, so I'm OK removing it if it's interfering with folks' work, but there has to be a good alternative. At one point I was using Esc for this, but I don't know if that's problematic for other reasons.

Copy link
Contributor

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.

@gylaz
Copy link
Contributor

gylaz commented Oct 7, 2015

I'm 👍 on adding the two keybindings to support readline

@geoffharcourt
Copy link
Collaborator

@jjlangholtz, can you trim this PR down to only:

  1. remove the jj zsh mapping
    and
  2. add the '^B' and '^F' mappings

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.

geoffharcourt added a commit that referenced this pull request Oct 16, 2015
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.
@geoffharcourt
Copy link
Collaborator

Resolved only the jj binding in #432 as 8441455. Thanks for contributing!

@mike-burns
Copy link
Contributor

RIP jj.

bmorrall pushed a commit to bmorrall/dotfiles that referenced this pull request Jan 26, 2016
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.
bmorrall pushed a commit to bmorrall/dotfiles that referenced this pull request Jan 27, 2016
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.
bmorrall pushed a commit to bmorrall/dotfiles that referenced this pull request Jan 27, 2016
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.
echopi pushed a commit to echopi/dotfiles that referenced this pull request Nov 8, 2016
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.
aceyoung9 pushed a commit to aceyoung9/dotfiles that referenced this pull request Dec 1, 2016
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.
moofish32 pushed a commit to moofish32/dotfiles that referenced this pull request Jan 12, 2017
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants