summaryrefslogtreecommitdiff
path: root/.emacs.d/lisp/keys.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp/keys.el')
-rw-r--r--.emacs.d/lisp/keys.el77
1 files changed, 53 insertions, 24 deletions
diff --git a/.emacs.d/lisp/keys.el b/.emacs.d/lisp/keys.el
index 051a93a..83ba948 100644
--- a/.emacs.d/lisp/keys.el
+++ b/.emacs.d/lisp/keys.el
@@ -1,31 +1,60 @@
;; init-keys.el
;;; Code:
+(require 'multi-vterm)
+(require 'vterm)
+(require 'general)
+(require 'pdf-tools)
-;;Ibuffer
-(global-set-key (kbd "C-x C-b") 'ibuffer)
-
-;;Editing
-(global-set-key (kbd "C-d") 'kill-region)
-(global-set-key (kbd "C-k") 'copy-region-as-kill)
-
-;;Counsel
-(global-set-key (kbd "M-;") 'counsel-M-x)
-
-;;Window control map
+;; my general's leader key!
+(defconst general-key "C-;")
(define-prefix-command 'window-control-map)
(global-set-key (kbd "C-w") 'window-control-map)
-(define-key window-control-map (kbd "C-v") 'split-window-right)
-(define-key window-control-map (kbd "C-n") 'windmove-right)
-(define-key window-control-map (kbd "C-p") 'windmove-left)
-(define-key window-control-map (kbd "C-q") 'delete-window)
-
-
-;;; God Mode
-;; (use-package god-mode
-;; :init
-;; (god-mode)
-;; :config
-;; (global-set-key (kbd "C-f") #'god-mode-all))
-
+(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