Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change ~/.emacs to auto split screen and run eshell

Tags:

emacs

After loading emacs, I always run the following command to setup the work environment:

1> C-x 2 to split the window as two buffers

2> C-x o to move cursor to the new created buffer

3> M-x eshell to enter shell mode

4> C-x o to move back to the original buffer.

Question> Is there a way that I can do all these automatically or at least make it little easier.

Thank you

like image 236
q0987 Avatar asked Feb 02 '26 22:02

q0987


2 Answers

Try this in your .emacs file:

(split-window)
(other-window 1)
(shell)
(other-window 1)
like image 102
Vernon Avatar answered Feb 04 '26 16:02

Vernon


You can record this sequence as a keyboard macro, see this answer.

like image 25
jtahlborn Avatar answered Feb 04 '26 15:02

jtahlborn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!