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

Risky switch-to-command-mode vi binding #338

Closed
huyl opened this issue Dec 10, 2012 · 7 comments
Closed

Risky switch-to-command-mode vi binding #338

huyl opened this issue Dec 10, 2012 · 7 comments
Labels

Comments

@huyl
Copy link

huyl commented Dec 10, 2012

I gotta say I laughed when I saw this in the editor module:

# Switch to command mode.
bindkey -M viins "jk" vi-cmd-mode
bindkey -M viins "kj" vi-cmd-mode

Cute, but doesn't belong in a useful project like this one. Can you really say that users won't ever intend to type "jk" at the command line? For example, a filename could contain these characters. We probably shouldn't surprise users like that.

@huyl
Copy link
Author

huyl commented Dec 10, 2012

Oh wow, it's worse than I thought. Because of these bindings, when you type 'j' or 'k', the ZLE pauses momentarily and the character doesn't appear immediately -- to see if you'll type the second character.

That's very silly

@sorin-ionescu
Copy link
Owner

Neither jk nor kj are often found in English. So, having them does not cause a lot of problems. It doesn't not seem to pause on my end.

@sorin-ionescu
Copy link
Owner

I'm open to removing them if there are votes to do so.

@hierynomus
Copy link

+1 Pauses slightly indeed. Characters appear immediately if you directly type another letter after the j or k.

@hierynomus
Copy link

Just ran into this the hard way, we have a guy whose git alias is dijkstra, and I cannot get to his repositories because the I get "dtra"...
First "di", then "jk" (end up in command mode), "s" substitute (insert mode again) "tra"...

Please remove these aliases...

@Fl4t
Copy link
Contributor

Fl4t commented Dec 16, 2012

+1

If I repeat the keystroke j (or k) infinitely, no input apear since I release these keys. This kind of moment appear after using git log or less, man witch use it to scroll down/up the terminal.

@sorin-ionescu
Copy link
Owner

Ok. I'll remove it.

Bklyn pushed a commit to Bklyn/prezto that referenced this issue Dec 24, 2012
* https://github.com/sorin-ionescu/prezto:
  [Fix sorin-ionescu#347] Move 'users' from tag-order to group-order
  Add an alias to ammend a git commit, including the message
  Update external syntax-highlighting
  Update external completions
  [Fix sorin-ionescu#348] Clarify how GNU utilities are wrapped
  [Fix sorin-ionescu#338] Remove vi jk and kj bindings
  Check for the existence of .zcompdump before compiling
  Fix auto completion for SSH hosts when saved with a non-standard port
  [Fix sorin-ionescu#335] Prevent rbenv from hashing gems at startup
  Fix a typo in git documentation
linuslundahl pushed a commit to linuslundahl/prezto that referenced this issue Oct 17, 2013
lildude pushed a commit to lildude/prezto that referenced this issue Jan 12, 2014
lackac pushed a commit to lackac/prezto that referenced this issue Jan 19, 2014
Bklyn pushed a commit to Bklyn/prezto that referenced this issue Jul 18, 2014
* 'master' of https://github.com/Bklyn/prezto:
  [Fix sorin-ionescu#347] Move 'users' from tag-order to group-order
  Add an alias to ammend a git commit, including the message
  Update external syntax-highlighting
  Update external completions
  [Fix sorin-ionescu#348] Clarify how GNU utilities are wrapped
  [Fix sorin-ionescu#338] Remove vi jk and kj bindings
  Check for the existence of .zcompdump before compiling
  Fix auto completion for SSH hosts when saved with a non-standard port
  [Fix sorin-ionescu#335] Prevent rbenv from hashing gems at startup
  Fix a typo in git documentation
kodelint pushed a commit to kodelint/prezto that referenced this issue Nov 15, 2016
kodelint pushed a commit to kodelint/prezto that referenced this issue Nov 15, 2016
kodelint pushed a commit to kodelint/prezto that referenced this issue Nov 15, 2016
Instead, use the %N prompt expando, as suggested by Bart in users/21637.

Avoid the `print -P %N` syntax to save a fork on Cygwin, at the expense
of not supporting zsh's from 2001 through c. 2004 vintages.

Fixes sorin-ionescu#338.
rooney pushed a commit to rooney/prezto that referenced this issue Aug 19, 2020
RIT80 pushed a commit to RIT80/prezto that referenced this issue Jan 25, 2022
RIT80 added a commit to RIT80/prezto that referenced this issue Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants