Skip to content

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 <yu.carl@outlook.com>
@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 <yu.carl@outlook.com>
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.

4 participants