-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimium_back
187 lines (148 loc) · 5.61 KB
/
vimium_back
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#########################################
unmapAll # Use Emacs-style bindings only.
#########################################
# Modifier Keys w/ Emacs Terminology:
# `<c-*>` = ⌃ Control Key; i.e. `C-*`.
# `<a-*>` = ⌥ Meta Key (Alt/Option); i.e. `M-*`.
# To clarify, `<a-*>` is `M-*` in the world of Emacs.
# `<m-*>` = ⌘ Command Key (prone to conflicts).
# Avoid ⌘ key conflicts in Google Chrome.
# It's good to avoid the ⌘ key altogether.
# ~ See: http://bit.ly/VUvR7i
# The ⇧ Shift key is not used explicitly. However,
# all of these keyboard shortcuts are caSe-sensitive.
# Therefore, `<c-b>` is certainly NOT the same as `<c-B>`.
# Meaning, the ⇧ Shift key **is** necessary in some cases.
# You will also need the Shift key for things like `<a-}>`.
#########################################
# Similar to Emacs `(next|previous)-line`.
map n scrollDown
map p scrollUp
# Similar to Emacs `(backward|forward)-char`.
map b scrollLeft
map f scrollRight
# Similar to Emacs `(beginning|end)-of-buffer`.
map <a-<> scrollToTop
map <a->> scrollToBottom
# Identical to Emacs `scroll-(left|right)`.
map <c-x>< scrollToLeft
map <c-x>> scrollToRight
# Identical to `scroll-(down|up)-command`.
map <a-v> scrollFullPageUp
map <c-v> scrollFullPageDown
# Identical to Emacs `scroll-(up|down)-line`
# No KBD shortcut in Emacs by default, so not using.
# Similar to Emacs `(backward|forward)-paragraph`.
map <a-{> scrollPageUp
map <a-}> scrollPageDown
# Identical to Emacs `find-alternate-file`.
map <c-x><c-v> reload
# Not implemented in Emacs.
map <a-s> toggleViewSource
# Identical to Emacs `delete-window`.
map <c-x>0 removeTab
# Not implemented in Emacs.
map <a-w> copyCurrentUrl
map <c-g><c-l> LinkHints.activateModeToCopyLinkUrl
# Not implemented in Emacs.
map <c-g><c-o> openCopiedUrlInCurrentTab
map <c-g><c-O> openCopiedUrlInNewTab
# Not implemented in Emacs.
map <c-g>< goUp
map <c-g>/ goToRoot
# Not implemented in Emacs.
map <c-g><c-i> enterInsertMode
# Not implemented in Emacs.
map <c-g><c-f> focusInput
# Similar to Emacs `find-file`.
map <c-x><c-f> LinkHints.activateMode
map <c-x><c-F> LinkHints.activateModeToOpenInNewForegroundTab
map <c-x><a-f> LinkHints.activateModeWithQueue
map <c-x>f LinkHints.activateModeToOpenInNewTab
# Similar to Emacs `list-directory`.
map <a-d> Vomnibar.activate
map <a-D> Vomnibar.activateInNewTab
# Similar to Emacs `switch-to-buffer`.
map <c-x>b Vomnibar.activateTabSelection
# Similar to Emacs `list-buffers`.
map <c-x><c-b> Vomnibar.activateBookmarks
map <c-x><c-B> Vomnibar.activateBookmarksInNewTab
# Not implemented in Emacs.
# Similar to Emacs `(previous|next)-buffer`.
# However, this uses `<c-g>` instead of `<c-x>`.
map <c-g><left> goPrevious
map <c-g><right> goNext
# Similar to Emacs `other-frame`.
# Also similar to Emacs `other-window`.
# The correct mapping is `<c-x>5o`, but not possible.
# Vimium doesn't support the `o` argument.
# Instead using `<c-x>o` here.
map <c-x>o nextFrame
# Similar to Emacs `set-mark-command`.
# Similar to Emacs `pop-global-mark`.
# Can't use `<c-<space>>` it conflicts w/ Chrome.
# In Chrome, `<space>` scrolls the current document.
# ------------------------------------------------------------------
# NOTE: both of these require that you enter a letter
# that you want to associate with a Vimium mark.
# e.g. `<c-@>` `a` ... and to return: `<c-x><c-@>` `a`.
# ------------------------------------------------------------------
map <c-@> Marks.activateCreateMode
map <c-x><c-@> Marks.activateGotoMode
# Similar to Emacs `isearch-forward`.
# Similar to Emacs `isearch-repeat-(forward|backward)`.
# ------------------------------------------------------------------
# NOTE: Vimium doesn't support repeated `<c-s>`.
# Instead, use `<c-S>` to move to next result.
# ------------------------------------------------------------------
# NOTE: `<c-S>` may conflict w/ SnagIt™. If you run this app,
# please remap SnagIt™ to resolve this potential conflict.
# ------------------------------------------------------------------
# NOTE: Vimium requires that you press the `<enter>` key
# before shortcuts `<c-S>` and `<c-R>` will actually work.
# ------------------------------------------------------------------
map <c-S> enterFindMode
map <c-s> performFind
map <c-r> performBackwardsFind
map <c-R> performBackwardsFind
# Not implemented in Emacs.
# Similar to Emacs `(backward|forward)-char`.
# However, this uses capitals w/ the shift key.
map <c-B> goBack
map <c-F> goForward
# Not implemented in Emacs.
# Similar to Emacs `(previous|next)-buffer`.
map <c-b> previousTab
map <c-f> nextTab
# Not implemented in Emacs.
# Similar to Emacs `(previous|next)-buffer`.
map <c-x><up> firstTab
map <c-x><down> lastTab
# Similar to Emacs `generate-new-buffer`.
# No KBD shortcut in Emacs by default.
map <c-g><c-t> createTab
# Similar to `clone-indirect-buffer-other-window`.
# The correct mapping is `<c-x>4c`, but not possible.
# Vimium doesn't support the `c` argument.
map <c-x>4 duplicateTab
# Not implemented in Emacs.
# Similar to Emacs `recover-file`.
# No KBD shortcut in Emacs by default.
map <c-g><c-r> restoreTab
# Similar to `make-frame-command`.
# The correct mapping is `<c-x>52`, but not possible.
# Vimium doesn't support the `2` argument.
map <c-x>5 moveTabToNewWindow
# Not implemented in Emacs.
# Similar to `set-window-dedicated-p`.
# No KBD shortcut in Emacs by default.
map <c-g><c-p> togglePinTab
# Not implemented in Emacs.
# Similar to `buff-move(left|right)`.
# See package: <http://bit.ly/Z1ZXYg>
# Also similar to: `(backward|forward)-word`
# However, this uses capitals w/ the shift key.
map <a-B> moveTabLeft
map <a-F> moveTabRight
# Similar to Emacs help commands.
map <c-h> showHelp