I am new to Emacs. I can invoke a shell or eshell using M-x shell or M-x eshell. This created a shell and I can run executables from it. By default, this shell is in the same window as my source code. So, I can switch between the source code and the shell using: C-x Right/ Left.

I would like to have this shell to be side by side with my source code. So, I tried to do : C-x 3. This creates a vertical split. I then have shell on 1 side and source code on the other. But, how do I switch back and forth between the splits? I can click on which split I want, but I am struggling to find the shortcut to switch.

Please help


2 Answers 2


The command to change from one window to another as you describe is other-window which is bound to C-x o by default.


For two windows, C-x o works just fine. But what if you want more than two? Circling through them can be a pain, especially since there's no way to go backwards.

This is why it wasn't long before I discovered window-number-mode. There is also Window Numbering Mode which has the benefit of being a Melpa package and lets you use Meta+number to switch windows.

Check those out when you start getting tired of C-x o

Your Answer

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

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