diff options
-rw-r--r-- | config.org | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/config.org b/config.org index f41c24b..5af41cb 100644 --- a/config.org +++ b/config.org | |||
@@ -628,6 +628,49 @@ This is not /quite/ correct yet. For example, scrolling in the margins with a t | |||
628 | (bind-key vec #'mwheel-scroll)) | 628 | (bind-key vec #'mwheel-scroll)) |
629 | #+end_src | 629 | #+end_src |
630 | 630 | ||
631 | ** Keyboard | ||
632 | |||
633 | *** Use =ESC= as a cancel key | ||
634 | |||
635 | From [[https://github.com/link0ff/emacs-init][link0ff]]. I thought they made a great point that =ESC= isn’t necessary to copy the =META= key on window-systems, which is where I use Emacs, anyway. | ||
636 | |||
637 | #+begin_src emacs-lisp | ||
638 | (when window-system | ||
639 | (define-key global-map [escape] 'keyboard-escape-quit) | ||
640 | (define-key isearch-mode-map [escape] 'isearch-cancel)) | ||
641 | #+end_src | ||
642 | |||
643 | *** Make =C-z= more useful as a prefix key | ||
644 | |||
645 | Also from link0ff. See the above for a link. | ||
646 | |||
647 | #+begin_src emacs-lisp | ||
648 | (defvar my-map | ||
649 | (let ((map (make-sparse-keymap)) | ||
650 | (c-z (global-key-binding "\C-z"))) | ||
651 | (global-unset-key "\C-z") | ||
652 | (define-key global-map "\C-z" map) | ||
653 | (define-key map "\C-z" c-z) | ||
654 | map)) | ||
655 | (run-hooks 'my-map-defined-hook) | ||
656 | #+end_src | ||
657 | |||
658 | *** Which-key | ||
659 | |||
660 | #+begin_src emacs-lisp | ||
661 | (use-package which-key | ||
662 | :config | ||
663 | (which-key-mode +1)) | ||
664 | #+end_src | ||
665 | |||
666 | *** Bindings | ||
667 | |||
668 | **** Switch to another window | ||
669 | |||
670 | #+begin_src emacs-lisp | ||
671 | (bind-key "M-o" #'other-window) | ||
672 | #+end_src | ||
673 | |||
631 | * Persistence | 674 | * Persistence |
632 | 675 | ||
633 | ** Save history | 676 | ** Save history |