summaryrefslogtreecommitdiffstats
path: root/.emacs.d/jd/jd-keys.el
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2024-04-27 20:09:08 +0200
committerjdlugosz963 <jdlugosz963@gmail.com>2024-04-27 20:09:08 +0200
commit06e0a80f7b509fc2a565aff9ec8311caf4bf6aae (patch)
tree8edc05e4a3d05250863bbbaa3bb2228373772612 /.emacs.d/jd/jd-keys.el
parent73af89d935df5a8166114c9257f9f247f29850bf (diff)
downloaddotfiles-06e0a80f7b509fc2a565aff9ec8311caf4bf6aae.tar.gz
dotfiles-06e0a80f7b509fc2a565aff9ec8311caf4bf6aae.zip
Remove trash and change name from jd/use-package to use-package!
Diffstat (limited to '.emacs.d/jd/jd-keys.el')
-rwxr-xr-x.emacs.d/jd/jd-keys.el156
1 files changed, 39 insertions, 117 deletions
diff --git a/.emacs.d/jd/jd-keys.el b/.emacs.d/jd/jd-keys.el
index 26a6445..108c70c 100755
--- a/.emacs.d/jd/jd-keys.el
+++ b/.emacs.d/jd/jd-keys.el
@@ -1,124 +1,46 @@
1;;; Dotfiles --- Jakub Dlugosz emacs config 1;;; Dotfiles --- Jakub Dlugosz emacs config
2;;; Commentary: 2;;; Commentary:
3 3;; Custom keysets used in my emacs
4;;; Code: 4;;; Code:
5 5
6;; (jd/use-package evil "emacs-evil" 6(use-package! multiple-cursors "emacs-multiple-cursors"
7;; :init 7 :config
8;; (setq evil-want-integration t) 8 (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
9;; (setq evil-want-keybinding nil) 9 (global-set-key (kbd "C->") 'mc/mark-next-like-this)
10;; (setq evil-want-C-u-scroll t) 10 (global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
11;; (setq evil-want-Y-yank-to-eol t) 11 (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this))
12;; (setq evil-want-C-i-jump nil) 12
13;; (setq evil-undo-system 'undo-tree) 13
14;; (setq evil-kill-on-visual-paste nil) 14(use-package! hydra "emacs-hydra"
15;; :config 15 ;; :defer t
16;; (evil-set-initial-state 'exwm-mode 'emacs) 16 :config
17;; (evil-mode 1)) 17 (defun jd/text-scale-increase ()
18 18 (interactive)
19(jd/use-package multiple-cursors "emacs-multiple-cursors" 19 (let ((old-face-attribute (face-attribute 'default :height)))
20 :config 20 (set-face-attribute 'default nil :height (+ old-face-attribute 10))))
21 (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) 21
22 (global-set-key (kbd "C->") 'mc/mark-next-like-this) 22 (defun jd/text-scale-decrease ()
23 (global-set-key (kbd "C-<") 'mc/mark-previous-like-this) 23 (interactive)
24 (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)) 24 (let ((old-face-attribute (face-attribute 'default :height)))
25 25 (set-face-attribute 'default nil :height (- old-face-attribute 10))))
26(jd/use-package shackle "emacs-shackle") 26
27(jd/use-package sway "emacs-sway") 27 (defhydra hydra-text-scale-global (:timeout 4)
28 28 "scale text"
29(jd/use-package general "emacs-general" 29 ("j" jd/text-scale-increase "in")
30 :config 30 ("k" jd/text-scale-decrease "out")
31 (general-create-definer jd/leader-key-def 31 ("q" nil "finished" :exit t)) ;; TODO not working
32 :keymaps '(normal insert visual emacs) 32
33 :prefix "SPC" 33 (defhydra hydra-text-scale (:timeout 4)
34 :global-prefix "C-z") 34 "scale text"
35 35 ("j" text-scale-increase "in")
36 (general-create-definer jd/ctrl-c-keys 36 ("k" text-scale-decrease "out")
37 :prefix "C-c") 37 ("q" nil "finished" :exit t)))
38 38
39 ;; (jd/leader-key-def 39(use-package! undo-tree "emacs-undo-tree"
40 ;; "w" 'evil-window-map 40 :diminish
41 ;; "wr" '(hydra-resize-window/body :which-key "Rezize window") 41 :config
42 ;; "wd" '(evil-window-delete :which-key "Window delete")) 42 (setq undo-tree-auto-save-history nil)
43 43 (global-undo-tree-mode 1))
44 (jd/leader-key-def
45 "ou" '(undo-tree-visualize :which-key "Open"))
46
47 ;; remove . key
48 ;; (define-key evil-normal-state-map (kbd ".") '())
49 (jd/leader-key-def
50 "f" '(:ignore t :which-key "Files")
51 "fs" '(save-buffer :which-key "File save")
52 "." '(find-file :which-key "Find file")
53 "ff" '(find-file :which-key "Find file"))
54
55 (jd/leader-key-def
56 "e" '(:ignore t :which-key "Eval")
57 "eb" '(eval-buffer :which-key "Eval buffer")
58 "ee" '(eval-defun :which-key "Eval defun"))
59
60 (jd/leader-key-def
61 :keymaps '(visual)
62 "er" '(eval-region :which-key "Eval region"))
63
64 (defun jd/kill-other-buffers ()
65 (interactive)
66 (mapc 'kill-buffer (cdr (buffer-list (current-buffer)))))
67
68 (jd/leader-key-def
69 "bK" '(jd/kill-other-buffers :which-key "Kill other buffers")
70 "bk" '(kill-current-buffer :which-key "Kill buffer")
71 "bB" '(ibuffer :which-key "Open ibuffer")))
72
73
74(jd/use-package hydra "emacs-hydra"
75 ;; :defer t
76 :config
77 (defun jd/text-scale-increase ()
78 (interactive)
79 (let ((old-face-attribute (face-attribute 'default :height)))
80 (set-face-attribute 'default nil :height (+ old-face-attribute 10))))
81
82 (defun jd/text-scale-decrease ()
83 (interactive)
84 (let ((old-face-attribute (face-attribute 'default :height)))
85 (set-face-attribute 'default nil :height (- old-face-attribute 10))))
86
87 ;; (defhydra hydra-resize-window (:timeout 4)
88 ;; ("h" evil-window-decrease-width "<")
89 ;; ("l" evil-window-increase-width ">")
90 ;; ("k" evil-window-decrease-height "^")
91 ;; ("j" evil-window-increase-height "v")
92 ;; ("q" nil "finished" :exit t))
93
94 (defhydra hydra-text-scale-global (:timeout 4)
95 "scale text"
96 ("j" jd/text-scale-increase "in")
97 ("k" jd/text-scale-decrease "out")
98 ("q" nil "finished" :exit t))
99
100 (defhydra hydra-text-scale (:timeout 4)
101 "scale text"
102 ("j" text-scale-increase "in")
103 ("k" text-scale-decrease "out")
104 ("q" nil "finished" :exit t))
105
106 (jd/leader-key-def
107 "tS" '(hydra-text-scale-global/body :which-key "Scale text")
108 "ts" '(hydra-text-scale/body :which-key "Scale text")))
109
110
111(jd/use-package undo-tree "emacs-undo-tree"
112 :diminish
113 :config
114 (setq undo-tree-auto-save-history nil)
115 (global-undo-tree-mode 1))
116
117;; (jd/use-package evil-collection "emacs-evil-collection"
118;; :after evil
119;; :config
120;; (evil-collection-init))
121
122 44
123(provide 'jd-keys) 45(provide 'jd-keys)
124 46