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

Plugin Request: Vi-Mode #165

Open
f-a-a opened this issue May 29, 2017 · 5 comments
Open

Plugin Request: Vi-Mode #165

f-a-a opened this issue May 29, 2017 · 5 comments
Assignees

Comments

@f-a-a
Copy link

f-a-a commented May 29, 2017

Zshell has the ability to go into vi-mode with bindkey -v settings. If you are using oh-my-zsh, this feature can be enabled by including the vi-mode plugin.

However, the interest with geometry is to port the visual indicator over. vi-mode implements its own visual indicator function vi_mode_prompt_info() where it toggles between vimcmd and main mode indicating NORMAL and INSERT mode respectively.

The request here is to include the visual indicator as a plugin in geometry. Thank you in advance.

\cc @fribmendes, @desyncr

@desyncr
Copy link
Member

desyncr commented May 30, 2017

This is a great opportunity to create a new built-in plugin or custom plugin for anyone interested in their first PR. As reference there is already a basic implementation in the gitter chatroom: https://gitter.im/geometry-zsh/Lobby?at=592a5c1bfcbbe1891c50bcad

Thanks @f-a-a for bringing this up.

@desyncr desyncr self-assigned this Jan 22, 2018
@jedahan
Copy link
Member

jedahan commented Aug 21, 2019

this needs to be re-visited since its not as straightfoward as just checking for KEYMAP

alxbl added a commit to alxbl/geometry that referenced this issue Oct 1, 2019
@jedahan
Copy link
Member

jedahan commented Oct 18, 2019

I tested it out, and it always shows even when I press esc, which should put me in command mode. I've never used vi-mode before so I might have something misconfigured, but i set bindkey -v in my zshrc...

@alxbl
Copy link
Collaborator

alxbl commented Oct 19, 2019

When I was testing locally, pressing ESC or ^[ should update the prompt to <NORMAL> and then hitting any of the edit keys should switch it back to <INSERT>. It should be possible to switch back and forth without ever submitting a command.

I'll check again but it could be that I missed something about the ZLE widget hooks and they're not being called properly. Thanks for testing it!

@alxbl
Copy link
Collaborator

alxbl commented Oct 20, 2019

I tried on a different computer and I get the same behavior. I'll need a bit of time to investigate.

@jedahan jedahan removed the easy label Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants