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

fix(toggleterm): start_in_insert not working #919

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Conversation

Jint-lzxy
Copy link
Collaborator

IMO this is a good patch (taken from #913) and should be merged.

IMO this is a good patch (taken from #913) and should be merged

---
Co-authored-by: YuCao16 <[email protected]>
@YuCao16
Copy link
Contributor

YuCao16 commented Aug 2, 2023

I initially assumed this to be an issue with the nightly version, but that's not the case. The start_in_insert doesn't work because persist_mode is set to true. persist_mode retains the mode from when you last exited toggleterm.nvim. If you exit the terminal using wincmd, then you would reenter in insert mode. In my case, I exit the terminal by pressing q after double-tapping . Consequently, toggleterm remembers that my previous mode was normal, and it sets the mode back to normal when I reenter toggleterm.

toggleterm.nvim Notice: "If using persist_mode terminal mappings should be changed to use wincmd instead otherwise persist mode will not work correctly."

@ayamir ayamir merged commit f302bf4 into main Aug 2, 2023
@ayamir ayamir deleted the fix/toggleterm-ins branch August 2, 2023 09:51
singlemancombat pushed a commit to singlemancombat/nvim-config that referenced this pull request Aug 2, 2023
IMO this is a good patch (taken from ayamir#913) and should be merged

---
Co-authored-by: YuCao16 <[email protected]>
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.

3 participants