Adds maximize-vertically function
This commit is contained in:
parent
d9e5652ae7
commit
f0a5c0960c
|
@ -115,7 +115,7 @@ automatically applied to."
|
|||
|
||||
;; https://tsdh.wordpress.com/2007/03/28/deleting-windows-vertically-or-horizontally/
|
||||
(defun spacemacs/maximize-horizontally ()
|
||||
"Delete all windows left or right of the current window."
|
||||
"Delete all windows to the left and right of the current window."
|
||||
(interactive)
|
||||
(require 'windmove)
|
||||
(save-excursion
|
||||
|
@ -124,6 +124,16 @@ automatically applied to."
|
|||
(while (condition-case nil (windmove-right) (error nil))
|
||||
(delete-window))))
|
||||
|
||||
(defun spacemacs/maximize-vertically ()
|
||||
"Delete all windows above and below the current window."
|
||||
(interactive)
|
||||
(require 'windmove)
|
||||
(save-excursion
|
||||
(while (condition-case nil (windmove-up) (error nil))
|
||||
(delete-window))
|
||||
(while (condition-case nil (windmove-down) (error nil))
|
||||
(delete-window))))
|
||||
|
||||
(defun spacemacs/toggle-centered-buffer-mode ()
|
||||
"Toggle `spacemacs-centered-buffer-mode'."
|
||||
(interactive)
|
||||
|
|
|
@ -442,7 +442,8 @@
|
|||
"w/" 'split-window-right
|
||||
"w=" 'balance-windows-area
|
||||
"w+" 'spacemacs/window-layout-toggle
|
||||
"w_" 'spacemacs/maximize-horizontally)
|
||||
"w_" 'spacemacs/maximize-horizontally
|
||||
"w|" 'spacemacs/maximize-vertically)
|
||||
;; text -----------------------------------------------------------------------
|
||||
(defalias 'count-region 'count-words-region)
|
||||
|
||||
|
|
Loading…
Reference in New Issue