-
Notifications
You must be signed in to change notification settings - Fork 0
/
user-keys.el
49 lines (44 loc) · 1.73 KB
/
user-keys.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
;;; -*- no-byte-compile: t -*-
;; This is your user keys file, here you can configure key bindings that will
;; get added to Corgi. You can also override Corgi's default bindings this way.
;;
;; Bindings here are nested, e.g. `("SPC" ("b" ("k" kill-buffer)))' means that
;; "space" followed by "b" and then "k" will invoke `M-x kill-buffer'.
;;
;; You can add a descriptions before the command, this will show up in a pop-up
;; when you press the prefix key and wait a bit. (This uses which-key)
;;
;; `("SPC" ("b" ("k" "Choose a buffer to kill" kill-buffer)))'
;;
;; Instead of a prefix key you can use a symbol like `normal' or `insert', which
;; designates the Evil state (what vim calls the mode). `global' means any
;; state, `normal|visual' means either normal or visual.
;;
;; Instead of a command like `kill-buffer' you can put a keyword like
;; `:eval/buffer'. This is called a "signal". In the `corgi-signals' (or
;; `user-signals') file these are bound to specific commands based on the major
;; mode. E.g. in Emacs Lisp `:eval/buffer' means `eval-buffer', whereas in
;; Clojure it means `cider-eval-buffer'.
(bindings
;; "global" bindings are always active regardless of Evil's "state" (= vim mode)
;; If you don't provide this the default is `normal'.
(global
("<XF86Calculator>" :project/switch)
("s-<XF86TouchpadToggle>" :project/open-file)
)
(normal
;; (","
;; ("x" "Do normal thing" ignore))
)
(visual
;; (","
;; ("x" "Do visual thing" ignore))
)
;; Bindings for commands are usually only active in normal and visual state.
(normal|visual
("SPC"
("g" "Git"
("b" "Git blame" magit-blame))
("o" "Open"
("u" "Open URL at point" browse-url-at-point)
("s" "Edit string at point" string-edit-at-point)))))