summaryrefslogtreecommitdiffstats
path: root/.emacs.d/jd/jd-keys.el
blob: 108c70c84f9c275f4375cd390cf8588583d5ebd5 (plain)
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
;;; Dotfiles --- Jakub Dlugosz emacs config
;;; Commentary:
;; Custom keysets used in my emacs
;;; Code:

(use-package! multiple-cursors "emacs-multiple-cursors"
  :config
  (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
  (global-set-key (kbd "C->") 'mc/mark-next-like-this)
  (global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
  (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this))


(use-package! hydra "emacs-hydra"
  ;; :defer t
  :config
  (defun jd/text-scale-increase ()
    (interactive)
    (let ((old-face-attribute (face-attribute 'default :height)))
      (set-face-attribute 'default nil :height (+ old-face-attribute 10))))

  (defun jd/text-scale-decrease ()
    (interactive)
    (let ((old-face-attribute (face-attribute 'default :height)))
      (set-face-attribute 'default nil :height (- old-face-attribute 10))))

  (defhydra hydra-text-scale-global (:timeout 4)
    "scale text"
    ("j" jd/text-scale-increase "in")
    ("k" jd/text-scale-decrease "out")
    ("q" nil "finished" :exit t)) ;; TODO not working

  (defhydra hydra-text-scale (:timeout 4)
    "scale text"
    ("j" text-scale-increase "in")
    ("k" text-scale-decrease "out")
    ("q" nil "finished" :exit t)))

(use-package! undo-tree "emacs-undo-tree"
  :diminish
  :config
  (setq undo-tree-auto-save-history nil)
  (global-undo-tree-mode 1))

(provide 'jd-keys)

;;; jd-keys.el ends here