-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdot.vimperatorrc
190 lines (165 loc) · 6.37 KB
/
dot.vimperatorrc
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
188
189
190
" -*- vimrc-generic -*-
"2.3.1 (created: 2010/04/07 18:56:53)
" use :source ~/.vimperatorrc to reload this file
" bug work around
" ===============
"
" See https://github.com/vimperator/vimperator-labs/issues/590#issuecomment-248833125.
"
" Fix is already committed, so should be fixed in next version of
" Vimperator (current version is 3.14.0 and today is Sep 28, 2016).
js services.services.autoCompleteSearch.class_="@mozilla.org/autocomplete/search;1?name=unifiedcomplete"
" notes
" =====
"
" - variables
"
" To get the current value of a variable do `:set <variable>?`. From
" http://awhan.wordpress.com/2010/07/15/default-values-of-variables-in-vimperator/
" custom key bindings
" ===================
"
" See `:help map`.
"
" - close tabs in a way that returns to the previously open tab
"
" I'm using the standard Firefox command, `C-w`, but
" `map d :quit <CR>` also works.
map d <C-w>
" - make 'j' and 'k' scroll a multiple of the default. Could also
" remap 'h' and 'l' like this, but I use them so rarely it probably
" makes sense to keep them precise.
noremap j 5j
noremap k 5k
" disable vimperator shorcuts
" ===========================
"
" Use Esc-S or INSERT to toggle.
"
" Can also combine them all into one:
"
" autocmd LocationChange .* js modes.passAllKeys =
" /(mail\.google\.com|typewith\.me|piratepad\.net)/.test(buffer.URL)
"
" See confusion at:
" https://code.google.com/p/vimperator-labs/issues/detail?id=406
"
" See `:help autocmd`.
"
" These run in order: the first rule sets default policy and the
" subsequent rules add exceptions.
autocmd LocationChange .* js modes.passAllKeys = false
autocmd LocationChange typewith\\.me js modes.passAllKeys = true
autocmd LocationChange piratepad\\.net js modes.passAllKeys = true
autocmd LocationChange duolingo\\.com js modes.passAllKeys = true
autocmd LocationChange calendar\\.google\\.com js modes.passAllKeys = true
autocmd LocationChange docs\\.google\\.com js modes.passAllKeys = true
autocmd LocationChange drive\\.google\\.com js modes.passAllKeys = true
autocmd LocationChange mail\\.google\\.com js modes.passAllKeys = true
" menus
" =====
set gui=none,tabs
" reverse video
" =============
"
" Install the BYM add-on. The default shortcut is C-M-b. It can be
" changed in the preferences, but doesn't take effect until after a
" restart.
" search engine shortcuts
" =======================
"
" by default, when you tell vimperator to open something that doesn't
" look like an address, e.g. with
"
" open the pickles
"
" it runs the shortcut with keyword defined by the defsearch variable.
"
" NOTE: however, you only get search completions when you use the
" keyword. E.g. "o" followed by "g trump is" presents "trump is love
" trump is life" (?!?!) among other completions, but plain "trump is"
" after "o" only shows URLs I've visited before that include at least
" one of "trump" and "is". The URL completions are also included in
" the "g trump is" version.
"
" The 'defsearch' variable defaults to 'google', which is the default
" keyword for google in firefox. So, if you change the keyword for
" google, say to 'g', then this default search behavior breaks. You
" can fix it by manually setting defsearch:
set defsearch=g
" On the other hand, when 'defsearch' is set to 'g', as above, but the
" google search keyword is still 'google', nothing breaks !!! Using
" `:set defsearch?` to get the value of 'defsearch', I see that still
" has the value 'google' after the above runs, when there is not 'g'
" keyword -- however, I get a harmless error "Invalid argument: g"
" when 'g' is not defined. So, I guess the 'set' of 'defsearch' is
" "smart" in that it only lets you set to the value of a defined
" search engine.
"
" After changing the keyword from 'google' to 'g' the default searches
" failed until I restarted vimperator.
"
" Got this from:
" http://code.google.com/p/vimperator-labs/issues/detail?id=589
"
" XXX: need to figure out how to store the search engines: One
" possibility is to set up a bunch of search keywords / bookmarks, and
" then use firefox sync to sync them across browsers. Even better
" would be to define them in this config ...
"
" You can access the search engines and change the keywords with
"
" dialog searchengines
"
" but the only way I know to *install* search engines is click on
" links, e.g. the 'search plugin' link at the top of
" haskell.org/hoogle.
"
" There is a great website for custom search engine plugins --
" http://mycroftproject.com/dlstats.html -- everything I wanted was
" already there, e.g. hayoo, and it looks like it's easy to add new
" search engines.
" added by vimperator
" ===================
set runtimepath=/home/collins/.vimperator
source! /home/collins/.vimperatorrc.local
" vim: set ft=vimperator:
" shortcuts to remember
" =====================
" :help : see them all
" b <page title snippet> : jump to tabs by name
" [[ or ]] : previous, next page
" D or d : delete current tab and move left or right
" C^x or C^a : decrement or increment last # in url
" :ju[mps] : to see history with jump offsets (for use with <num>C^o or C^i)
" :dialog <dialog> : open a firefox dialog
" . : repeat last command
" :w[in]c[close] : close current window
" C-^ or C-6 : switch to most recent buffer in *current* window
" G or gg : beginning or end of document
" gi : focus last input field; useful for focussing google search box
" oO or tT or wW: open/tab/window, starting with current url if upper case
" text fields
" -----------
"
" enter a text field the same as a link, e.g. "f<hint><enter>".
"
" gi : focus last input field; useful for focussing google search box
" <ESC> : leave a text field. But sometimes this doesn't work.
" C-[ : <ESC>. This works to leave a text field when plain <ESC> doesn't.
" zooming
" -------
" zI or zO : increase/reduce *full* zoom
" zi or zo : increase/reduce *text* zoom
" [percent] zz or zZ : set text/full zoom to percent, default 100
" open recently closed tab
" ------------------------
" :u[ndo] [url] : undo last closed tab, or tab matching [url]. you can TAb complete the [url] part.
" :emenu Rec<TAB> : select a recently closed tab (like History -> Recently Closed Tabs on menu bar)
" text selection
" --------------
" i : enter caret mode and position caret
" v : enter visual mode and highlight text by moving caret
" Y : copy text in visual mode
" <ESC> : leave caret or visual mode
" p or P : open clipboard in current or new tab