forked from SystemCrafters/crafted-emacs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rational-windows.el
33 lines (21 loc) · 944 Bytes
/
rational-windows.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
;;; rational-windows.el -*- lexical-binding: t; -*-
;; Copyright (C) 2022
;; SPDX-License-Identifier: MIT
;; Author: System Crafters Community
;; Commentary
;; Emacs windows configuration.
;;; Code:
(defcustom rational-windows-evil-style nil
"When t, window movement bindings will be evil-style.")
(defcustom rational-windows-prefix-key "C-c w"
"Configure the prefix key for `rational-windows' bindings.")
(winner-mode 1)
(define-prefix-command 'rational-windows-key-map)
(define-key 'rational-windows-key-map (kbd "u") 'winner-undo)
(define-key 'rational-windows-key-map (kbd "n") 'windmove-down)
(define-key 'rational-windows-key-map (kbd "p") 'windmove-up)
(define-key 'rational-windows-key-map (kbd "b") 'windmove-left)
(define-key 'rational-windows-key-map (kbd "f") 'windmove-right)
(global-set-key (kbd rational-windows-prefix-key) 'rational-windows-key-map)
(provide 'rational-windows)
;;; rational-windows.el ends here