summaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/keys.el
blob: 83ba9484e57e87fc392d87bf7283b22bbf10811f (about) (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
48
49
50
51
52
53
54
55
56
57
58
59
60
;; init-keys.el
;;; Code:
(require 'multi-vterm)
(require 'vterm)
(require 'general)
(require 'pdf-tools)

;; my general's leader key!
(defconst general-key "C-;")
(define-prefix-command 'window-control-map)
(global-set-key (kbd "C-w") 'window-control-map)
(general-create-definer general-does
  :prefix general-key)

;; Basic functions
(general-define-key
 "C-d" 'kill-region
 "C-k" 'copy-region-as-kill)


					; My general does the following:
(general-does
  "t" 'counsel-load-theme
  "l" 'display-line-numbers-mode
  "v" 'multi-vterm-next
  "e" 'eshell)

;;pdf-tools
(general-define-key
 :keymaps 'pdf-view-mode-map
 "C-c d" 'pdf-view-midnight-minor-mode
 "C-s" 'isearch-forward
 "C-o" 'pdf-isearch-occur)

;;vterm 
(general-does
  :keymaps 'vterm-mode-map
  "n" 'multi-vterm-next
  "o" 'multi-vterm
  "p" 'multi-vterm-prev)

;;eshell
(general-does
  :keymaps 'eshell-mode-map
  "n" 'eshell-new)

;;pdf-tools

;;Add pdf-isearch-minor-mode hook, otherwise isearch will be buggy
;;Darkmode hook, cause I don't want color or light in my life, I'm a vampire.
(add-hook 'pdf-view-mode-hook 'pdf-isearch-minor-mode)
(add-hook 'pdf-view-mode-hook 'pdf-view-midnight-minor-mode)

(general-define-key
 :keymaps 'pdf-view-mode-map
 "C-c d" 'pdf-view-midnight-minor-mode
 "C-s" 'isearch-forward
 "C-o" 'pdf-isearch-occur)

;;init-keys ends here