emacs/lisp/mitch-keybinds.el

49 lines
1.5 KiB
EmacsLisp
Raw Normal View History

2022-06-19 14:13:36 -08:00
;;; mitch-keybinds.el --- do keybinding things, mostly with General...
;;; Commentary:
;; -----------------------------------------------------------------------------
;; There are a lot of things we do with the keyboard. Perhaps all of the
;; things, in fact. Thus, we use the `general' package for transparently
;; defining keybindings in various states. See
;; `https://github.com/noctuid/general.el' for more.
;; -----------------------------------------------------------------------------
;;; Code:
;; Toggle Japanese with `qq'
;; Sample text: 進撃 の 巨人
;; (shingeki no kyojin (attack on titan))
;; DISABLED because something broke and I didn't bother figuring out what...
(general-define-key
:states 'insert
"q" (general-key-dispatch 'self-insert-command
:timeout 0.25
"q" 'toggle-input-method))
2022-08-28 14:23:01 -08:00
;; Zoom, for bad resolutions (windows)
2022-06-19 14:13:36 -08:00
(general-define-key
"<escape>" 'keyboard-escape-quit
"C--" 'text-scale-decrease
"C-=" 'text-scale-increase)
2022-08-28 14:23:01 -08:00
;; we are not spacemacs, but we might be
2022-06-19 14:13:36 -08:00
(general-define-key
:states '(normal visual)
:prefix "SPC"
:non-normal-prefix "SPC"
"w" 'evil-window-map
"h" 'help-command
"b" 'switch-to-buffer
2022-06-21 17:04:19 -08:00
"g" 'magit
2022-06-19 14:13:36 -08:00
"SPC" 'evil-buffer)
2022-08-28 14:23:01 -08:00
;; SPC shortcuts for lisp. Works with anything that uses the default emacs binds
2022-06-19 14:13:36 -08:00
(general-define-key
:states '(normal visual)
:prefix-command 'eval-map-prefix
:prefix-map 'eval-map
:prefix "SPC e"
"l" (general-key "C-x C-e")
"b" (general-key "C-c C-e")
"r" (general-key "C-c C-v r")
2022-06-19 14:13:36 -08:00
"s" 'eshell)
(provide 'mitch-keybinds)
;;; mitch-keybinds.el ends here