3

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.

enter image description here

This is very convinient as I can 'see' what I am typing and helm sources without moving my head.

On the other hand, If I keep point in right split, press M-x, minibuffer will be on bottom and M-x still will be in left corner like this.

enter image description here

If M-x starts from the middle, it would be very convenient.

How can I position text in minibuffer w.r.t to split?

Also, when window is split horizontally, how can I position minibuffer at the bottom of top slit?

  • 1
    Pretty sure you can't do any of this. Check out 1-on-1 frames for a frame-oriented solution. – Dan Aug 30 '15 at 11:27
4

What you want to achieve might be tricky (if not impossible) to achieve. But it seems that all you want is to keep the helm-sources (the helm window) and the minibuffer in same direction so that you can view them without have move your eyes around much. I think this can be achieved using on of the methods below

1) Customize helm so that the "helm window" is always in the bottom-left window.

Since the minibuffer is always positioned at bottom-left of the screen, this would mean that you can view helm-sources and the minibuffer at once.

We can achieve that by writing a custom function to select the window to display the helm buffer. And set helm-split-window-preferred-function to this function. I am providing one such function below

;; So that helm does not use current window to display the helm window
(setq helm-split-window-in-side-p nil)


(defun my-helm-split-window (window)
  (if (one-window-p t)
      ;; With just window helm does the right thing
      (split-window
       (selected-window) nil (if (eq helm-split-window-default-side 'other)
                                 'below helm-split-window-default-side))

    ;; If there are multiple windows, select the bottom-left window
    (while (window-in-direction 'left)
      (select-window (window-in-direction 'left)))
    (while (window-in-direction 'below)
      (select-window (window-in-direction 'below)))

    (selected-window)))

(setq helm-split-window-preferred-function #'my-helm-split-window)

2) Another solution is to echo the input to helm, in the header line

This way the input can be seen at the top of the helm window irrespective of the position of the window

To achieve this set helm-echo-input-in-header-line to t. Additionally you can use some tips mentioned in this reddit thread to show input only in the header

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.