emacs/lisp/mitch-keybinds.el

46 lines
1.4 KiB
EmacsLisp

;;; 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:
;; Japanese input?
(general-define-key
:states 'insert
"q" (general-key-dispatch 'self-insert-command
:timeout 0.25
"q" 'toggle-input-method))
;; Zoom, for bad resolutions (windows)
(general-define-key
"<escape>" 'keyboard-escape-quit
"C--" 'text-scale-decrease
"C-=" 'text-scale-increase)
;; we are not spacemacs, but we might be
(general-define-key
:states '(normal visual)
:prefix "SPC"
:non-normal-prefix "SPC"
"w" 'evil-window-map
"h" 'help-command
"b" 'switch-to-buffer
"g" 'magit
"SPC" 'evil-buffer)
;; SPC shortcuts for lisp. Works with anything that uses the default emacs binds
(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")
"s" 'eshell)
(provide 'mitch-keybinds)
;;; mitch-keybinds.el ends here