diff options
Diffstat (limited to 'files/.emacs.d/jd/jd-keys.el')
-rwxr-xr-x | files/.emacs.d/jd/jd-keys.el | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/files/.emacs.d/jd/jd-keys.el b/files/.emacs.d/jd/jd-keys.el new file mode 100755 index 0000000..8c1c4cb --- /dev/null +++ b/files/.emacs.d/jd/jd-keys.el | |||
@@ -0,0 +1,49 @@ | |||
1 | ;;; Dotfiles --- Jakub Dlugosz emacs config | ||
2 | ;;; Commentary: | ||
3 | ;; Custom keysets used in my emacs | ||
4 | ;;; Code: | ||
5 | |||
6 | (use-package multiple-cursors | ||
7 | :guix-package "emacs-multiple-cursors" | ||
8 | :config | ||
9 | (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) | ||
10 | (global-set-key (kbd "C->") 'mc/mark-next-like-this) | ||
11 | (global-set-key (kbd "C-<") 'mc/mark-previous-like-this) | ||
12 | (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)) | ||
13 | |||
14 | (use-package hydra | ||
15 | :guix-package "emacs-hydra" | ||
16 | ;; :defer t | ||
17 | :config | ||
18 | (defun jd/text-scale-increase () | ||
19 | (interactive) | ||
20 | (let ((old-face-attribute (face-attribute 'default :height))) | ||
21 | (set-face-attribute 'default nil :height (+ old-face-attribute 10)))) | ||
22 | |||
23 | (defun jd/text-scale-decrease () | ||
24 | (interactive) | ||
25 | (let ((old-face-attribute (face-attribute 'default :height))) | ||
26 | (set-face-attribute 'default nil :height (- old-face-attribute 10)))) | ||
27 | |||
28 | (defhydra hydra-text-scale-global (:timeout 4) | ||
29 | "scale text" | ||
30 | ("j" jd/text-scale-increase "in") | ||
31 | ("k" jd/text-scale-decrease "out") | ||
32 | ("q" nil "finished" :exit t)) ;; TODO not working | ||
33 | |||
34 | (defhydra hydra-text-scale (:timeout 4) | ||
35 | "scale text" | ||
36 | ("j" text-scale-increase "in") | ||
37 | ("k" text-scale-decrease "out") | ||
38 | ("q" nil "finished" :exit t))) | ||
39 | |||
40 | (use-package undo-tree | ||
41 | :guix-package "emacs-undo-tree" | ||
42 | :diminish | ||
43 | :config | ||
44 | (setq undo-tree-auto-save-history nil) | ||
45 | (global-undo-tree-mode 1)) | ||
46 | |||
47 | (provide 'jd-keys) | ||
48 | |||
49 | ;;; jd-keys.el ends here | ||