Added: recentf mode for consult-recent-files
This commit is contained in:
parent
9db3d64540
commit
ddcf2ff173
|
|
@ -115,16 +115,21 @@
|
||||||
|
|
||||||
(defun rhjr/split-window-80col ()
|
(defun rhjr/split-window-80col ()
|
||||||
"Split the selected window into two side-by-side windows,
|
"Split the selected window into two side-by-side windows,
|
||||||
with the left one exactly 80 columns wide, when only one
|
with the left one exactly 88 columns wide, when only one
|
||||||
window is open. If two windows are already open, leave the
|
window is open. If two windows are already open, resize the
|
||||||
layout untouched and just select the right window."
|
left one back to 88 columns (undoing any manual resizing)
|
||||||
|
and select the right window."
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (one-window-p t)
|
(if (one-window-p t)
|
||||||
(progn
|
(progn
|
||||||
(split-window-right 88)
|
(split-window-right 88)
|
||||||
(other-window 1))
|
(other-window 1))
|
||||||
(when-let ((w (window-right (selected-window))))
|
(let* ((left (or (window-left (selected-window)) (selected-window)))
|
||||||
(select-window w))))
|
(right (window-right left))
|
||||||
|
(delta (- 88 (window-width left))))
|
||||||
|
(unless (zerop delta)
|
||||||
|
(window-resize left delta t))
|
||||||
|
(select-window right))))
|
||||||
|
|
||||||
(defun rhjr/swap-windows ()
|
(defun rhjr/swap-windows ()
|
||||||
"Swap the buffers/states of the two windows in the current frame,
|
"Swap the buffers/states of the two windows in the current frame,
|
||||||
|
|
@ -135,6 +140,11 @@ than following the buffer."
|
||||||
(window-swap-states nil (next-window))
|
(window-swap-states nil (next-window))
|
||||||
(select-window this-window)))
|
(select-window this-window)))
|
||||||
|
|
||||||
|
(defun my/compile-preserve-size ()
|
||||||
|
(when-let ((win (get-buffer-window (current-buffer))))
|
||||||
|
(window-preserve-size win nil t)))
|
||||||
|
(add-hook 'compilation-start-hook #'my/compile-preserve-size)
|
||||||
|
|
||||||
;;; rhjr/mode
|
;;; rhjr/mode
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
|
|
@ -144,6 +154,7 @@ than following the buffer."
|
||||||
(global-display-line-numbers-mode 1)
|
(global-display-line-numbers-mode 1)
|
||||||
(delete-selection-mode 1)
|
(delete-selection-mode 1)
|
||||||
(column-number-mode 1)
|
(column-number-mode 1)
|
||||||
|
(recentf-mode 1)
|
||||||
|
|
||||||
;;; rhjr/packages
|
;;; rhjr/packages
|
||||||
(use-package magit
|
(use-package magit
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user