-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathboon-workman.el
More file actions
118 lines (97 loc) · 4.66 KB
/
boon-workman.el
File metadata and controls
118 lines (97 loc) · 4.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
;;; boon --- An Ergonomic Command Mode -*- lexical-binding: t -*-
;;; Commentary:
;; fgeller's workman port (WIP, contributions welcome)
;;; Code:
(require 'boon)
(define-key boon-select-map (kbd "g") 'boon-select-document)
(define-key boon-select-map (kbd "w") 'boon-select-paragraph)
(define-key boon-select-map (kbd "d") 'boon-select-word)
(define-key boon-select-map (kbd "r") 'boon-select-word) ;; 'rf' is easier to type than 'rw'
(define-key boon-select-map (kbd "x") 'boon-select-outside-pairs) ;; eXpression
(define-key boon-select-map (kbd "m") 'boon-select-inside-pairs) ;; Contents
(define-key boon-select-map (kbd "h") 'boon-select-wim) ;; symbol
(define-key boon-select-map (kbd "q") 'boon-select-outside-quotes)
(define-key boon-select-map (kbd "SPC") 'boon-select-line)
(define-key boon-select-map (kbd "s") 'boon-select-justline) ;; Row
(define-key boon-select-map (kbd "a") 'boon-select-borders) ;; Around
(define-key boon-select-map (kbd "z") 'boon-select-content) ;; inZide
(define-key boon-moves-map (kbd "k") 'boon-switch-mark) ; bacK to marK
(define-key boon-moves-map (kbd "K") 'boon-switch-mark-quick) ; quicK bacK to marK
(define-key boon-moves-map (kbd "j") 'boon-find-char-backward)
(define-key boon-moves-map (kbd "J") 'boon-find-char-forward)
(define-key boon-moves-map (kbd "u") 'previous-line)
(define-key boon-moves-map (kbd "p") 'next-line)
(define-key boon-moves-map (kbd "U") 'backward-paragraph)
(define-key boon-moves-map (kbd "P") 'forward-paragraph)
(define-key boon-moves-map (kbd "f") 'boon-beginning-of-line)
(define-key boon-moves-map (kbd ";") 'boon-end-of-line)
(define-key boon-moves-map (kbd "n") 'boon-smarter-backward)
(define-key boon-moves-map (kbd "i") 'boon-smarter-forward)
(define-key boon-moves-map (kbd "N") 'boon-smarter-upward)
(define-key boon-moves-map (kbd "I") 'boon-smarter-downward)
(define-key boon-moves-map (kbd ",") 'boon-beginning-of-expression)
(define-key boon-moves-map (kbd ".") 'boon-end-of-expression)
(define-key boon-moves-map (kbd "e") 'backward-char)
(define-key boon-moves-map (kbd "o") 'forward-char)
(define-key boon-moves-map (kbd "<") 'beginning-of-buffer)
(define-key boon-moves-map (kbd ">") 'end-of-buffer)
(define-key boon-moves-map (kbd "C-,") 'beginning-of-buffer)
(define-key boon-moves-map (kbd "C-.") 'end-of-buffer)
;; Special keys
;; LEFT HAND
;; Top row
;; q
(define-key boon-command-map (kbd "q") 'boon-quote-character)
;; w,f
;; where is? find?
(define-key boon-moves-map "d" 'boon-backward-search-map)
(define-key boon-moves-map "r" 'boon-forward-search-map)
(define-key boon-moves-map (kbd "D") 'boon-qsearch-previous)
(define-key boon-moves-map (kbd "R") 'boon-qsearch-next)
;; p
;; Pinpoint Place
(define-key boon-command-map (kbd "w") 'occur)
;; Misc crap
(define-key boon-command-map (kbd "W") 'kmacro-end-or-call-macro) ; Play
(define-key boon-command-map (kbd "X") 'boon-highlight-regexp)
;; g Gather/Go To
(define-key boon-command-map (kbd "b") boon-goto-map)
;; home row
;; a
(define-key boon-command-map (kbd "a") 'boon-enclose) ; around
(define-key boon-command-map (kbd "A") 'boon-swap-region) ; swap
;; r
(define-key boon-command-map (kbd "s") 'boon-substitute-region) ; replace
(define-key boon-command-map (kbd "S") 'kmacro-start-macro) ; Record
;; s
(define-key boon-command-map (kbd "h") 'boon-splice) ; splice
(define-key boon-command-map (kbd "H") 'yank-pop)
;; t
(define-key boon-command-map (kbd "t") 'boon-take-region) ; "take"
(define-key boon-command-map (kbd "T") 'boon-treasure-region) ; "treasure"
;; d
(define-key boon-command-map (kbd "g") 'boon-replace-by-character) ; "displace"
;; Bottom row
;; z
;; reserved (repeat?)
(define-key boon-command-map (kbd "z") 'undefined)
;; x
(define-key boon-command-map (kbd "x") boon-x-map)
;; c
(define-key boon-command-map (kbd "m") 'boon-c-god)
;; v
(define-key boon-command-map (kbd "C-c") 'boon-open-line-and-insert)
(define-key boon-command-map (kbd "C") 'boon-open-next-line-and-insert)
(define-key boon-command-map (kbd "c") 'boon-set-insert-like-state) ; 'v' looks like an insertion mark
;; b
(define-key boon-command-map (kbd "V") 'boon-copy-to-register)
(define-key boon-command-map (kbd "v") 'insert-register)
;; RIGHT HAND: movement and marking commands.
;; Most of these are actually in the boon-moves-map; however some don't quite work there; so they end up here.
(define-key boon-command-map (kbd "C-u") 'scroll-up-line)
(define-key boon-command-map (kbd "C-p") 'scroll-down-line)
(define-key boon-command-map (kbd "y") 'ace-jump-word-mode) ; hop
(define-key boon-command-map (kbd "Y") 'ace-jump-char-mode) ; Hop
(define-key boon-command-map (kbd "'") 'boon-toggle-mark)
(provide 'boon-workman)
;;; boon-workman.el ends here