开发者

Open new Emacs buffer using vertical splitting

How can I make vertical splitting the default instead of horizontal splitting in Emacs?

My use case: I want to compare a Python file with an older revision of itself from the svn-repository, I do this with the C-x v ~ command. Unfortunately this always opens开发者_如何学运维 a second buffer while splitting the window horizontally. Vertically would be much better (at least for PEP-8 compliant files ;)).


See the answers to the question Setting Emacs Split to Horizontal and do the opposite.

Taking offby1's answer and inverting it gives you:

(setq split-height-threshold 0)
(setq split-width-threshold nil)


Mine does open vertically when I try it. I don't have any experience with that particular command, but if it's like most emacs commands it decides which way to split the window based on the current window dimensions: if the window is tall it will split horizontally, but if it's wide it will split vertically. So just change the window dimensions to be wider and it should switch automatically

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜