4

Scenario: I'm working with a horizontal split

---------------------
|  File 1  |  File 2 |
|          |         |
|          |         |
----------------------

and I'm working on File 2.

Question 1: Sometimes when I use a command like M-x helm-mini and load up another file the new file opens up in File 1's window. I'd like it to open up in the current window

This happens:

----------------------                   ----------------------
|  File 1  | *File 2* |                  | File 3  |  File 2  |
|----------|----------|   --Select--->   |         |          |
|       Helm          |                  |         |          |
----------------------                   |---------------------

I'd like to keep file 1 active. This is very annoying Emacs behavior

Question 2: M-x helm-mini (for example) does a few other annoying thing. First, it expands the size of File 2's window to full width. Secondly, the temp vertically split buffer for the helm-mini buffer is full width as well

Preferably I'd like this to happen:

---------------------                   ----------------------
|  File 1  |  File 2 |                  | File 1  |  File 3  |
|          |---------|   --Select--->   |         |          |
|          | Helm    |                  |         |          |
----------------------                  |---------------------

I'd like the new split helm screen (or any new command window) to only fill the current working window. Is that possible?

-- Update --

I didn't intend to make this a helm only type question. I think simply put I'd like: If I have 2 files horizontally split I don't want emacs to disturb those windows unless I open a new file.

Like if I'm working in file1, file2 window should never change. I can't stand when emacs does this. I am either working on file2 or using it as a reference -- I don't want that buffer changed

Drew
  • 77,472
  • 10
  • 114
  • 243
Shaun
  • 177
  • 8
  • Interesting edit to this question. Apparently what vim calls vertical splits are horizontal splits in emacs – Shaun Jan 06 '16 at 15:57

1 Answers1

2

For question 2, you want to set helm-split-window-in-side-p non-nil.

For question 1, your desired behavior is how it works on my setup, and I can't find anything in my helm config that seems to be affecting this. I suspect helm is respecting the vanilla Emacs settings that affect whether buffers try to open in the active window. I'm not very familiar with those, so maybe someone else can weigh in.

Aaron Harris
  • 2,684
  • 17
  • 22