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

Switch to insert mode on focus #223

Closed
3 tasks done
smarquez1 opened this issue Jun 16, 2023 · 1 comment
Closed
3 tasks done

Switch to insert mode on focus #223

smarquez1 opened this issue Jun 16, 2023 · 1 comment
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Comments

@smarquez1
Copy link

smarquez1 commented Jun 16, 2023

General information

Please report the following information as possible as you can:

  • Terminal program: Kitty 0.28.1
  • Operating system: Macos Ventura 13.4
  • ZSH framework: zim
  • ZSH version: 5.9

Basic examination

  • I have read through the README page
  • I have the latest version of zsh-vi-mode
  • I have tested with another terminal program

Problem description

Reproduction steps

  1. Switch to normal mode
  2. focus a different window or terminal
  3. Still be in Normal mode

Expected behavior

I'd like to have my terminals always switch to insert mode on focus.
I tried using zvm_config but it onlly gets executed on init. Is there a way I can write a function that will programatically switch to insert mode on focus?

This is specially useful for me using tmux and executing scripts from vim or other terminals

@smarquez1 smarquez1 changed the title Switch to insert mode on focus? Switch to insert mode on focus Jun 16, 2023
@jeffreytse jeffreytse self-assigned this Jul 6, 2023
@jeffreytse jeffreytse added help wanted Extra attention is needed good first issue Good for newcomers question Further information is requested labels Jul 6, 2023
@smarquez1
Copy link
Author

To answer me, this is what I do in my configuration:

function zvm_config() {
  ZVM_LINE_INIT_MODE=$ZVM_MODE_INSERT
}
plug "jeffreytse/zsh-vi-mode"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants