1

I've added these keybinding configuration in my Spacemacs dot file, so that I can toggle the terminal by press the \ key.

;; Keybindings
(define-key evil-normal-state-map (kbd "\\") 'spacemacs/default-pop-shell)
(define-key evil-motion-state-map (kbd "\\") 'spacemacs/default-pop-shell)

By default, the terminal starts in evil-insert-state. However, I have to go to evil-normal-state to close the terminal window with \, which means, when I open the terminal again, it would be in evil-normal-state.

This inconsistence makes me feel bad. How can I make the popup terminal start in evil-normal-state?

1 Answer 1

4

Perhaps (evil-set-initial-state 'term-mode 'normal) will do what you want.

4
  • Unfortunately it doesn't...
    – nalzok
    Feb 13, 2017 at 2:31
  • Does (evil-set-initial-state 'spacemacs/default-pop-shell 'normal)?
    – mclear
    Feb 13, 2017 at 2:55
  • No, still not working... However, I found this works: (evil-set-initial-state 'term-mode 'normal). You can edit your answer and I'll accept it.
    – nalzok
    Feb 13, 2017 at 3:01
  • Glad that worked out
    – mclear
    Feb 13, 2017 at 3:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.