When I open an R file in ESS-mode, I'd like emacs to setup my panes in a certain format.
To this end, I've added the following to my init.el
.
(add-hook 'ess-mode-hook
(lambda()
(split-window-horizontally)
(other-window 1)
(vterm)
(R)
))
When I run emacs myfile.R
, emacs opens and prompts me to specify a project directory, which I do. This results in the vertical split on the right, which gives me pretty much what I show above. Awesome! But there is one problem. While myfile.R
is opened as a buffer, the left-hand pane actually shows the scratch buffer. Why is that and how do I avoid it?