Questions tagged [window-splitting]

is for splitting an Emacs window into two. Multiple windows can display different buffers, or different parts of one buffer. Emacs has several default key bindings for splitting windows.

Filter by
Sorted by
Tagged with
17
votes
4answers
2k views

How can I get a sensible split-window policy?

Emacs is constantly making new windows and it's been ruining my day lately. How can I tell emacs to use the following policy when creating windows? Prefer vertical splits Stop doing vertical splits ...
12
votes
2answers
1k views

Collapse split windows

Given split windows like this: |------|-------| |1 |2 | | | | |------|-------| |3 |4 | | | | |------|-------| There are two options to collaps the split ...
12
votes
1answer
1k views

Open helm search result in a new window?

Commands like helm-projectile-grep, helm-swoop, projectile-find-file are extremely useful for jumping around code. However, so far I've not found how I can open a search result in a new window (...
11
votes
3answers
2k views

Prefer vertical splits over horizontal ones

There are several questions similar to this one. I have read them all and they don't provide an answer for my scenario. I want emacs to prefer vertical splits (splitting windows into left and right ...
7
votes
1answer
1k views

How can I tell Emacs to always open help buffers in the current window?

When looking up documentation with describe-function, Emacs display the docstring in a temporary help buffer. I want this buffer to replace current window. So far, I've customized help-window-select ...
7
votes
3answers
2k views

Open file from dired in the same window — using the mouse

How do you configure emacs to open a file in the current window -- using the mouse -- when it is selected from a dired buffer? That is, when I open a directory and then select a file with the mouse ...
6
votes
4answers
1k views

Switch between horizontal and vertical splitting?

From time to time, by mistake, I split my screen vertically C-x 3 (binded to split-window-right), whereas I originally wanted a horizontal splitting C-x 2 (binded to split-window-below). Question: is ...
6
votes
3answers
2k views

Permanent window with list of opened buffers

Is there some mode where emacs fixes a small window with a list of opened buffers? This is what simpler editors have (kate,gedit,etc). Here's an example from Kate: In the left window there is a list ...
6
votes
1answer
1k views

desktop-save-mode fails to save window layout

I use Emacs 24.5.1 on OS X in terminal mode. I intend to use desktop-save-mode to save and restore window layout (i.e. positions of buffer windows) upon exiting and starting Emacs. From this answer ...
6
votes
1answer
1k views

open helm selection in horizontal split

I'm switching from vim and so far everything is going smoothly. One thing I'm sorely missing is ctrlp's functionality for opening the selected file in a horizontal split with C-x or vertical split ...
5
votes
2answers
714 views

Workspace configuration

I'm working with Emacs on several different projects with several different languages. I'm seeking for solution that could help manage project as workspace. Meaning Understand language in use and ...
5
votes
1answer
177 views

C-x 3 open a new buffer to the left of the current buffer

When strike C-x 3, a new window and buffer will open to the right of the current buffer. How could set it open to the left of the current?
5
votes
1answer
167 views

emacs home made perspective: source + eshell + compilation

I want such functionality from emacs (gnu 25), I press key in any buffer with source code, and instead of one buffer I got 3 buffers on the screen: source code buffer ------------------ *eshell* | *...
5
votes
2answers
413 views

Open org-mode links to info in different window?

I was wondering if anyone knew of a way to open links to info pages (Emacs manual) from org-mode without changing the current buffer to that info page? The reason I would like to do this is because I ...
4
votes
2answers
719 views

How to disable Spacemacs from auto-balancing the split windows?

I am using Spacemacs and after using the splitting windows feature, either by splitting horizontally or vertically, Spacemacs always try to balance the split windows. For example, when pressing C-x 3 ...
4
votes
1answer
470 views

Completions buffer messes up window sizes

I am not sure what to search for. I have used emacs for 25+ years, but I am not a guru. I use it as a tool, and I don't want to spend much time changing it. I generally like to have one window, or ...
4
votes
1answer
462 views

Let switch-to-buffer to already open buffer switch to that window, rather than open it in this one

Is there a way to make switch-to-buffer more dwim in this regard? Let's say I have two windows with foo.el and bar.el open. With my point in foo.el, if I switch-to-buffer and open bar.el, I'd like to ...
4
votes
1answer
714 views

Split window buffers

Scenario: I'm working with a horizontal split --------------------- | File 1 | File 2 | | | | | | | ---------------------- and I'm working on File 2. Question ...
4
votes
1answer
224 views

How to display *help* buffers below one specific window?

I am (really) new in Emacs and ESS, and I am currently trying to customize my environment. The default settings of ESS[R] are convenient for me, since ESS[R] organizes the windows as follows: --------...
4
votes
2answers
190 views

Display all/current CSV heading names

In CSV files (especially ones with a lot of columns and/or a lot of rows) I find that it's hard to tell which column I'm on. Normally I'd like to know either the column heading, or sometimes the ...
4
votes
0answers
846 views

Org-Mode Agenda Open in Left Window by Default

With a vertical split (C-x 3), regardless of which buffer I am in, C-c a opens the agenda on the right window, pushing my org file into the left window. Is it possible to have the agenda open into ...
4
votes
2answers
623 views

Neotree window permanently resizes other windows

I usually have my emacs frame something like this: | | | | <window 1> | <window 2> | | | | When I open neotree, it then looks like this (...
3
votes
1answer
450 views

Split Emacs Screen Three Ways

In my .emacs file I have (split-window-right). This has been working fine so far, but now I'm finding it would be easier if my workspace looked like: where each box is a separate window. So really I ...
3
votes
1answer
683 views

Auto adjust window width based on number of windows?

If i run C-x 3, when emacs starts up it will split window and creates two windows of equal size like this Now i run C-x 3 again it will split current window into two parts resulting in this ...
3
votes
1answer
766 views

Open vertical splits to the right

Using spacemacs with Evil. :vsp opens a new split vertical, but it always does it to the left. How can one configure it to open them to the right?
3
votes
2answers
899 views

Algorithm on deciding splitting vertically or horizontally

When I do M-x compile, emacs will split my window to launch compilation and show its logs in a new window. As I understand, it has some algorithm to decide how to split the window. So, when I have ...
3
votes
1answer
694 views

Show Helm candidates at left, immediately above minibuffer

If I split a frame vertically, keep point in left split and press M-x, minibuffer will be on bottom and M-x will be in left corner like this. This is very convinient as I can 'see' what I am typing ...
3
votes
1answer
537 views

How to force new `shell` to appear in current window?

Whenever I run M-x shell, a buffer appears almost randomly somewhere - splitting current windows as it sees fit. I cannot work out the logic behind it. The docstring says: (shell &optional BUFFER)...
3
votes
1answer
337 views

Splitting window vertically (rather than horizontally) when searching in Dired

My Emacs Dired window is wider than it is tall. After marking some files (say %m *.cpp) in Dired and running M-x dired-do-find-regexp <REGEXP> (A), I find myself in split-window-below (ex split-...
3
votes
1answer
1k views

How to open multiple files without automatically activating the “Buffer List” split?

Running emacs with multiple files automatically opens the "Buffer List" split-window. eg: emacs -Q *.txt Opens a split window, one which contains a list of buffers. How can multiple files be ...
3
votes
1answer
133 views

can other-buffer in split windows select a visible buffer?

I often swap 2 most latest buffers back and forth with (switch-to-buffer (other-buffer)). This works just fine in most situations. However, when I have 2 split windows, and the other window is ...
3
votes
1answer
1k views

Is it possible to open links in another buffer (Org Mode)?

i often make links in Org Mode to files, which should open in emacs, but in another buffer than the one, which contains the link. It would be the best, if they open in a buffer next to the one I work ...
3
votes
1answer
222 views

Magit popups no longer behaving as popups (in my setup)

I like to have my emacs set up as one full-screen frame with two side-by-side windows at all time. To do this, I've used this code to force emacs not to split windows arbitrarily: (defun never-split-...
3
votes
1answer
292 views

How to move windows?

How can I move a window from being a horizontal split down below all other windows to being a vertical split panel on the left? I don't want to move buffer contents - I want to move the actual window.
3
votes
2answers
337 views

How to force 'Ctrl-X, Ctrl-B' to always split vertically?

Once upon a time, Choose Window (invoked by C-x C-b) used to always split the window vertically. Starting from a certain Emacs version (I can't recall which one), that split is now either vertical or ...
3
votes
1answer
115 views

Have compilation errors / grep match reuse current frame/window without ever splitting it?

I have searched in a number of places (1, 2, 3, 4) even looked at the e-lisp source files and could not figure out how to do, so I ask. Context I have bound next-error to a key. I'm in some source ...
3
votes
0answers
266 views

Force new window to open to the left or right

I have two frames open with the following window splits: Frame 1 Frame 2 |---+---+ |------| |a |b | |d | | | | | | |---+---+ | | |c | | | |---+---+ |------| Say that ...
3
votes
0answers
133 views

How to open all buffers in the same window and never create new one?

I'm using emacs in terminal via emacs-nox and I wish to sort of disable windows functionality at all. I mean I do not want each time to add some buffer to use display-buffer-same-window function, I ...
2
votes
2answers
362 views

Split helm window in different directions

I'd like helm-buffers-list to split my window horizontally, but I'd like for all other Helm functions to split it vertically. Is this possible?
2
votes
1answer
132 views

Minimap avoiding change window

Recently I started using minimap-mode, but it has been a bit buggy as sometimes when I split the window and open two different buffers, it won't let me go back to a buffer with code (and minimap). So ...
2
votes
2answers
147 views

How could I get alchemist to always open its test report in a window at the bottom?

alchemist.el has functions for running tests. These functions use display_buffer to show test results. Is there a way to ensure that all Alchemist test results open in a window that is the bottom-most ...
2
votes
1answer
143 views

How can I generate a buffer and render html in it?

I want to make a buffer in a new window (but not pop to it) insert HTML code in it, and render its content with shr-render-*. Yes, an HTML preview window, let me know if you know of a (simple) ...
2
votes
1answer
209 views

Is there a way to configure default window split positions when interacting with commands?

I always enjoyed horizontal splits when interacting with C-h k or a magit commit window, or anything like that. Now I'm seeing vertical splits when I interact with those commands. Is there a way to ...
2
votes
1answer
548 views

Open several files in a specifc layout with a shortcut

I would like to open in emacs, with a shortcut/bookmark three files in this configuration: _____________ | | B | | A |___| | | C | |_______|___| A is my main editing file, B is for ...
2
votes
1answer
36 views

Linked, Split screen scrolling for a single buffer?

I would like to be able to have a C-x 3 split to have two windows in a frame both windows view a single buffer window on left ends at line n window on right starts at line n +/- configurable offset ...
2
votes
2answers
461 views

When split-window-sensibly is called, how to make the decision depend on the width height ratio?

I would like to have split-window-sensibly splitting the window horizontally if the width is larger than height, or vertically otherwise. How can I achieve this?
2
votes
2answers
733 views

Is there a better way to override opening window in compilation-goto-locus?

I don't like the behavior of compilation-goto-locus (bound to Enter in a *compilation* or *grep* buffer), where it splits the window and jumps to the line in a new window. I prefer the *compilation*/*...
2
votes
1answer
302 views

How can I force emacs to never split frames, in particular for compile-goto-error?

I want emacs to always display new buffers in the current frame, but always taking the whole frame, rather than splitting it. I currently have customized display-buffer-alist to the following '(...
2
votes
1answer
71 views

how can I programatically transition between those 2 window layouts?

I am trying to implement this window transition a/ b/ --------- ------------- | 1 | 2 | | | 1 | 2 | --------- -> | 0 |-------| | 3 | 4 | | | 3 | 4 | --------- ...
2
votes
1answer
53 views

calc splits wrong window.

I have a problem with using calc. When I have two windows open in emacs, split vertically, calc frequently opens in the wrong window. Here's a demonstration of the problem that I ran with emacs -Q. ...