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

How do I disable VI mode? #560

Closed
ubershmekel opened this issue Aug 28, 2020 · 2 comments
Closed

How do I disable VI mode? #560

ubershmekel opened this issue Aug 28, 2020 · 2 comments

Comments

@ubershmekel
Copy link

I'm on a mac and it seems Option-⬅ triggers VI mode. I just wanted to skip between different parts of the command I'm editing.

In general there's no documentation describing this vi mode, how to use it. I'd personally just like to remove it. Is there a way to disable the VI mode or at least change the keys that trigger it?

@mafredri
Copy link
Collaborator

mafredri commented Aug 31, 2020

Hi, Pure doesn't enable VI-mode in any way, we simply support displaying VI-mode status, when it's activated by the user. If you look through your Zsh config, you should find a statement like bindkey -v somewhere, try removing that.

@ubershmekel
Copy link
Author

ubershmekel commented Sep 3, 2020

EDIT 2 - I found the solution to the problem in these stackoverflow links: https://apple.stackexchange.com/questions/400564/how-do-you-disable-vi-like-behavior-in-macos-terminal/400600 https://stackoverflow.com/questions/12382499/looking-for-altleftarrowkey-solution-in-zsh

EDIT - nope, it's still broken with \033e and \033b. It enters into some VI mode, and I'm super confused. CONTROL-U stops working, and I have to hit a to start editing the command line again. Back to the drawing board.

...Please ignore the text that follows :( ...

There was no bindkey -v to be found. I found that in bash as well, my option-left shortcut wasn't skipping words backwards. Turns out that I had a setting in the terminal app that caused option-left to enter VI mode.

To fix this on macOS 10.15.6, I opened the terminal app's preferences, and had to set the bindings.

Option-left = \033b
Option-right = \033e

The problem was that Option-right was set to \033f 🤔

Screen Shot 2020-09-02 at 5 22 55 PM

I wrote this solution in https://stackoverflow.com/questions/81272/how-to-move-the-cursor-word-by-word-in-the-os-x-terminal/63715149#63715149 as well.

I guess pure is in the clear here so I'll close the issue. Thank you!

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

No branches or pull requests

2 participants