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... Commented Feb 13, 2017 at 2:31
  • Does (evil-set-initial-state 'spacemacs/default-pop-shell 'normal)? Commented 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. Commented Feb 13, 2017 at 3:01
  • Glad that worked out Commented Feb 13, 2017 at 3:06

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.