Here are four (4) sample custom display-buffer family of functions that can be custom tailored to suit a user's particular needs -- above; below; left; right -- and here are four (4) interactive functions to display the file or directory of the current line of a dired-mode buffer. There are only three conditions: (a) if there is already a window displaying the target buffer, then choose it; (b) if there is a window in the direction desired that is available, then use it; (c) the catch-all is to create a new window in the desired direction if the other conditions are not met.

Usage:

M-x dired-display-above

M-x dired-display-below

M-x dired-display-left

M-x dired-display-right

There so many key-bindings already built-in to dired-mode and dired+ , that I dare not attempt to make up my own. The user is free choose his/her own keyboard shortcuts, which is beyond the scope of this limited example.

The user is free to add additional conditions to the sample display-buffer family of functions to handle more situations -- e.g., more windows than just a couple.

(defun my-display-buffer-below (buffer alist) "Doc-string." (let ( (window (cond ((get-buffer-window buffer (selected-frame))) ((window-in-direction 'below)) (t (split-window (selected-window) nil 'below))))) (window--display-buffer buffer window 'window alist display-buffer-mark-dedicated) window)) (defun my-display-buffer-above (buffer alist) "Doc-string." (let ( (window (cond ((get-buffer-window buffer (selected-frame))) ((window-in-direction 'above)) (t (split-window (selected-window) nil 'above))))) (window--display-buffer buffer window 'window alist display-buffer-mark-dedicated) window)) (defun my-display-buffer-left (buffer alist) "Doc-string." (let ( (window (cond ((get-buffer-window buffer (selected-frame))) ((window-in-direction 'left)) (t (split-window (selected-window) nil 'left))))) (window--display-buffer buffer window 'window alist display-buffer-mark-dedicated) window)) (defun my-display-buffer-right (buffer alist) "Doc-string." (let ( (window (cond ((get-buffer-window buffer (selected-frame))) ((window-in-direction 'right)) (t (split-window (selected-window) nil 'right))))) (window--display-buffer buffer window 'window alist display-buffer-mark-dedicated) window)) (defun dired-display-above () "Doc-string." (interactive) (let* ( (file-or-dir (dired-get-file-for-visit)) (buffer (find-file-noselect file-or-dir))) (my-display-buffer-above buffer nil))) (defun dired-display-below () "Doc-string." (interactive) (let* ( (file-or-dir (dired-get-file-for-visit)) (buffer (find-file-noselect file-or-dir))) (my-display-buffer-below buffer nil))) (defun dired-display-left () "Doc-string." (interactive) (let* ( (file-or-dir (dired-get-file-for-visit)) (buffer (find-file-noselect file-or-dir))) (my-display-buffer-left buffer nil))) (defun dired-display-right () "Doc-string." (interactive) (let* ( (file-or-dir (dired-get-file-for-visit)) (buffer (find-file-noselect file-or-dir))) (my-display-buffer-right buffer nil)))

EDIT: Here is a slightly more sophisticated / fun implementation of the above-concept, which gives the user the ability to use this non-interactively or interactively; e.g., M-x dired-display-buffer -- where the user will be prompted to choose a directory if not hovering over a file in dired-mode , and to choose a display direction (left, right, above, below).