summaryrefslogtreecommitdiff
path: root/emacs/.config/emacs-kj/lisp/kj-multiple-cursors.el
blob: b841d9fc61ae826ae485a43fc08319f209eb8cbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
;;; -*- lexical-binding: t; -*-

(use-package multiple-cursors
  :config
  (defvar kj/multiple-cursors-map
    (let ((map (make-sparse-keymap "cursors")))
      (define-repeating-key map "." mc/mark-next-like-this "→ this")
      (define-repeating-key map "," mc/mark-previous-like-this "← this")
      (define-repeating-key map ">" mc/skip-to-next-like-this "⇥ this")
      (define-repeating-key map "<" mc/skip-to-previous-like-this "⇤ this")
      (define-repeating-key map "<" mc/skip-to-previous-like-this "⇤ this")
      (define-repeating-key map "*" mc/mark-all-like-this "all like this")
      (define-repeating-key map "w" mc/mark-next-like-this-word "word")
      (define-repeating-key map "s" mc/mark-next-like-this-symbol "symbol")
      (define-repeating-key map "(" mc/mark-all-symbols-like-this-in-defun "symbol defun")
      (define-repeating-key map (kbd "DEL") mc/unmark-next-like-this "DEL last")
      (define-repeating-key map (kbd "<delete>") mc/unmark-previous-like-this "DEL first")
      (define-key map (kbd "C-g") '("quit" . ignore))
      map))
  (global-set-key (kbd "C-c m") (cons "cursors" kj/multiple-cursors-map)))

(provide 'kj-multiple-cursors)