forked from SystemCrafters/crafted-emacs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
crafted-windows.el
51 lines (37 loc) · 1.32 KB
/
crafted-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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
;;; crafted-windows.el -*- lexical-binding: t; -*-
;; Copyright (C) 2022
;; SPDX-License-Identifier: MIT
;; Author: System Crafters Community
;; Commentary
;; Emacs windows configuration.
;;; Code:
(defgroup crafted-windows '()
"Window related configuration for Crafted Emacs."
:tag "Crafted Windows"
:group 'crafted)
(define-obsolete-variable-alias
'rational-windows-evil-style
'crafted-windows-evil-style
"1")
(defcustom crafted-windows-evil-style nil
"When non-nil, window movement will use evil-style bindings."
:group 'crafted-windows
:type 'boolean)
(define-obsolete-variable-alias
'rational-windows-prefix-key
'crafted-windows-prefix-key
"1")
(defcustom crafted-windows-prefix-key "C-c w"
"Configure the prefix key for `crafted-windows' bindings."
:group 'crafted-windows
:type 'key)
(winner-mode 1)
(define-prefix-command 'crafted-windows-key-map)
(define-key 'crafted-windows-key-map (kbd "u") 'winner-undo)
(define-key 'crafted-windows-key-map (kbd "n") 'windmove-down)
(define-key 'crafted-windows-key-map (kbd "p") 'windmove-up)
(define-key 'crafted-windows-key-map (kbd "b") 'windmove-left)
(define-key 'crafted-windows-key-map (kbd "f") 'windmove-right)
(global-set-key (kbd crafted-windows-prefix-key) 'crafted-windows-key-map)
(provide 'crafted-windows)
;;; crafted-windows.el ends here