diff options
author | fpi | 2020-09-18 15:52:20 +0200 |
---|---|---|
committer | fpi | 2020-09-18 15:57:19 +0200 |
commit | f860cc0d756a713e9371892bb51cf33a5c767692 (patch) | |
tree | 23f557f46333f5ed837f37942b89a174f5e1b329 | |
parent | Add a mode to toggle between space and tab indentation (diff) |
Add functions to split window left and above
-rw-r--r-- | emacs-init.org | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/emacs-init.org b/emacs-init.org index 1e337eb..6f6badd 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2885,13 +2885,24 @@ better performance. =fit-window-to-buffer= automatically shrinks the current buffer based on the amount of displayed text. #+begin_src emacs-lisp - (use-package window - :init - <<window>> - :custom - (fit-window-to-buffer-horizontally t) - :bind (:map fpi-map ("s" . fit-window-to-buffer)) - ) +(use-package emacs % windows.el does not (provide 'windows) + :init + <<window>> + :custom + (fit-window-to-buffer-horizontally t) + :config + (defun split-window-left (&optional size) + (interactive "P") + (split-window-right size) + (other-window 1)) + (defun split-window-above (&optional size) + (interactive "P") + (split-window-below size) + (other-window 1)) + :bind + (:map global-map ("C-x C-3" . split-window-left)) + (:map global-map ("C-x C-2" . split-window-above)) + (:map fpi-map ("s" . fit-window-to-buffer))) #+end_src *** Window rules #+begin_src emacs-lisp :noweb-ref window |