diff options
-rw-r--r-- | init.el | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -1061,12 +1061,13 @@ | |||
1061 | ;; --------------------------------------------------------------------- | 1061 | ;; --------------------------------------------------------------------- |
1062 | 1062 | ||
1063 | ;; --------------------------------- | 1063 | ;; --------------------------------- |
1064 | ;; Keybind hints | 1064 | ;; Keybind assistance |
1065 | ;; ------------- | 1065 | ;; ------------------ |
1066 | ;; Show hints for available keybinds | 1066 | ;; There's no need to remember every |
1067 | ;; as you type them. | 1067 | ;; keybinds by heart. Just tell me. |
1068 | ;; --------------------------------- | 1068 | ;; --------------------------------- |
1069 | 1069 | ||
1070 | ;; Show keybind hints as they are typed | ||
1070 | (use-package which-key | 1071 | (use-package which-key |
1071 | :straight t | 1072 | :straight t |
1072 | :delight | 1073 | :delight |
@@ -1075,21 +1076,6 @@ | |||
1075 | (setq which-key-idle-delay 1.5 | 1076 | (setq which-key-idle-delay 1.5 |
1076 | which-key-side-window-max-height 5)) | 1077 | which-key-side-window-max-height 5)) |
1077 | 1078 | ||
1078 | |||
1079 | ;; --------------------------------- | ||
1080 | ;; Fix ESC behavior | ||
1081 | ;; ---------------- | ||
1082 | ;; The default behavior of the ESC | ||
1083 | ;; key is atrocious. Why in God's | ||
1084 | ;; name would I want it to close all | ||
1085 | ;; my windows when I press it twice? | ||
1086 | ;; | ||
1087 | ;; This fixes the behavior to do | ||
1088 | ;; what ESC should do: "escape" the | ||
1089 | ;; current thing I'm doing, like the | ||
1090 | ;; minibuffer or a popup window. | ||
1091 | ;; --------------------------------- | ||
1092 | |||
1093 | ;; Define function and keybind to list all bindings of a certain key | 1079 | ;; Define function and keybind to list all bindings of a certain key |
1094 | (defun mm/print-all-bindings-for-key (key) | 1080 | (defun mm/print-all-bindings-for-key (key) |
1095 | "Output all bindings for KEY in *MESSAGES*." | 1081 | "Output all bindings for KEY in *MESSAGES*." |
@@ -1109,6 +1095,20 @@ | |||
1109 | (global-set-key (kbd "C-h C-u k") 'mm/print-all-bindings-for-key) | 1095 | (global-set-key (kbd "C-h C-u k") 'mm/print-all-bindings-for-key) |
1110 | 1096 | ||
1111 | 1097 | ||
1098 | ;; --------------------------------- | ||
1099 | ;; Fix ESC behavior | ||
1100 | ;; ---------------- | ||
1101 | ;; The default behavior of the ESC | ||
1102 | ;; key is atrocious. Why in God's | ||
1103 | ;; name would I want it to close all | ||
1104 | ;; my windows when I press it twice? | ||
1105 | ;; | ||
1106 | ;; This fixes the behavior to do | ||
1107 | ;; what ESC should do: "escape" the | ||
1108 | ;; current thing I'm doing, like the | ||
1109 | ;; minibuffer or a popup window. | ||
1110 | ;; --------------------------------- | ||
1111 | |||
1112 | ;; Define fixed version of `keyboard-escape-quit' which does not close | 1112 | ;; Define fixed version of `keyboard-escape-quit' which does not close |
1113 | ;; windows or change their layout. | 1113 | ;; windows or change their layout. |
1114 | (defun mm/keyboard-escape-quit-keep-windows () | 1114 | (defun mm/keyboard-escape-quit-keep-windows () |