I have configured the spacemacs "shell" layer and set it up with multi-term to use the bash shell. When I activate it with SPC ' and enter the bash shell some of the keys like Ctrl-w used for navigating the windows are trapped by bash.

     ;; ----------------------------------------------------------------
     ;; Example of useful layers you may want to use right away.
     ;; Uncomment some layer names and press <SPC f e R> (Vim style) or
     ;; <M-m f e R> (Emacs style) to install them.
     ;; ----------------------------------------------------------------
     ;; better-defaults
     (shell :variables
            shell-default-shell 'multi-term
            shell-default-height 30
            shell-default-position 'bottom)
     ;; spell-checking
     ;; version-control

(defun dotspacemacs/user-config ()
  (setq multi-term-program "/bin/bash")

Are there some pre-existing key combinations that can be used instead?

  • eshell is a pure elisp shell. It is definitely not bash, and it does not run in a terminal emulator. Can you please clarify what you're asking?
    – phils
    Commented May 9, 2017 at 9:13
  • I have updated the question. I configured the shell to use multi-term and set multi-term to bash. It is related to a related question at emacs.stackexchange.com/questions/32680 and have seen your answer there.
    – vfclists
    Commented May 9, 2017 at 9:49
  • 2
    I've made some further changes to the text in an attempt to clarify. Please note that shell is likely to be interpreted as referring to M-x shell which is a comint-based shell integration, entirely distinct from running a shell in a term buffer (or ansi-term, multi-term, etc). Furthermore, shell-mode is unambiguously a reference to M-x shell, so most definitely avoid writing that if it's not what you mean.
    – phils
    Commented May 9, 2017 at 10:30

1 Answer 1


By default multi-term unbinds '("C-z" "C-x" "C-c" "C-h" "C-y" "<ESC>"). These defaults allow commands like C-x o (other-window) that you can use to move point to another window. If the default setting doesn't include some bindings you'd like to use you can adjust term-bind-key-alist and/or term-unbind-key-alist to the values you prefer.

  • To be totally frank I don't know what these terms mean. I have just started with emacs/spacmacs.
    – vfclists
    Commented May 9, 2017 at 21:14
  • Type M-x describe-variable RET term-bind-key-alist RET for documentation and current value. See emacswiki.org/emacs/MultiTerm for discussion and examples.
    – Ista
    Commented May 9, 2017 at 21:19
  • The result is [No match]
    – vfclists
    Commented May 9, 2017 at 21:26
  • Make sure multi-termis loaded, e.g. with (require 'multi-term).
    – Ista
    Commented May 9, 2017 at 21:39
  • multi-term is set to use bash and I have it already running when run M-x describe-variable RET term-bind-key-alist RET. Is there some other place where I should enter the `(require 'multi-term)?
    – vfclists
    Commented May 9, 2017 at 21:54

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.