vmaps 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +32 -0
- data/Rakefile +9 -0
- data/bin/vmaps_dump +6 -0
- data/bin/vmaps_json +5 -0
- data/derp.txt +330 -0
- data/lib/vmaps.rb +21 -0
- data/lib/vmaps/mapping.rb +21 -0
- data/lib/vmaps/parser.rb +32 -0
- data/lib/vmaps/version.rb +3 -0
- data/vmaps.gemspec +23 -0
- metadata +87 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d0daba48d9a39a3a2b9697ce249622c009c979c4
|
4
|
+
data.tar.gz: deb1b304328c731199de4b8c5069941ef08aa34d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 157adbd682755297d905c2bef9b17e51db940b528d320f06f8d0d05acc5f19edf900c78ddccae29de3e4badd56c62efe1205c3ee986cc9f0ae85e39ea014a33b
|
7
|
+
data.tar.gz: f72212539aaf64a9d8fd9e85d9a872a01f98bdd5c418551e4e764a570d09a98e4f6bd39028a1098ff4d8dbd73264a57384593253dbf90bd1e987b1461f6bcd69
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Mike Anderson
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Vmaps
|
2
|
+
|
3
|
+
This is a pair of tools for exploring your vim mappings:
|
4
|
+
`vmaps_dump` and `vmaps_json`.
|
5
|
+
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Or install it yourself as: (this gem is not published yet so this won't work)
|
10
|
+
|
11
|
+
$ gem install vmaps
|
12
|
+
|
13
|
+
|
14
|
+
## Usage
|
15
|
+
|
16
|
+
`vmaps_dump` sends the result of the vim command `:verbose map` to STDOUT.
|
17
|
+
`vmaps_json` converts this result into json. Isn't that all cute and Unix-y?
|
18
|
+
|
19
|
+
You probably just want to do this:
|
20
|
+
|
21
|
+
$ vmaps_dump | vmaps_json > mappings.json
|
22
|
+
|
23
|
+
You'll end with a bunch of json data, which you can use however you'd like.
|
24
|
+
|
25
|
+
|
26
|
+
## Contributing
|
27
|
+
|
28
|
+
1. Fork it
|
29
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
30
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
31
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
32
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
data/bin/vmaps_dump
ADDED
data/bin/vmaps_json
ADDED
data/derp.txt
ADDED
@@ -0,0 +1,330 @@
|
|
1
|
+
n <C-C> * :!!<CR>
|
2
|
+
<C-E> * 5<C-E>
|
3
|
+
n <C-H> * <C-W>h
|
4
|
+
n <NL> * <C-W>j
|
5
|
+
n <C-K> * <C-W>k
|
6
|
+
n <C-L> * <C-W>l
|
7
|
+
n <CR> * :noh<CR>
|
8
|
+
n <C-N> * :tabnext<CR>
|
9
|
+
n <C-O> * o<Esc>0D
|
10
|
+
n <C-P> * :<C-U>CtrlP<CR>
|
11
|
+
<C-Y> * 5<C-Y>
|
12
|
+
n ,vy* :call <SNR>92_ToggleFileAssociationsInExplorer()<CR>
|
13
|
+
n ,vy| :call <SNR>92_EchoOptionsSet()<CR>
|
14
|
+
n ,vyv :call <SNR>92_EchoGrepCommand()<CR>
|
15
|
+
n ,vy? :call <SNR>92_ToggleOptionsDisplay()<CR>
|
16
|
+
n ,vym :call <SNR>92_ToggleReplaceWindowMode()<CR>
|
17
|
+
n ,vys :call <SNR>92_Sort()<CR>
|
18
|
+
n ,vye :call <SNR>92_EchoFilesSearched()<CR>
|
19
|
+
n ,vy! :call <SNR>92_ToggleWholeWord()<CR>
|
20
|
+
n ,vyp :call <SNR>92_ToggleJumpToMatch()<CR>
|
21
|
+
n ,vyg :call <SNR>92_ToggleEveryMatch()<CR>
|
22
|
+
n ,vyo :call <SNR>92_ToggleOpenWindow()<CR>
|
23
|
+
n ,vyw :call <SNR>92_ToggleWindow()<CR>
|
24
|
+
n ,vyh :call <SNR>92_ToggleHidden()<CR>
|
25
|
+
n ,vyi :call <SNR>92_ToggleIgnoreCase()<CR>
|
26
|
+
n ,vyd :call <SNR>92_ToggleBufferDirectories()<CR>
|
27
|
+
n ,vyr :call <SNR>92_ToggleRecursion()<CR>
|
28
|
+
n ,vyc :call <SNR>92_ToggleCommand()<CR>
|
29
|
+
n ,vyx :call <SNR>92_SetFilesToExclude()<CR>
|
30
|
+
n ,vyu :call <SNR>92_ActivateUser()<CR>
|
31
|
+
n ,vyt :call <SNR>92_ActivateTracked()<CR>
|
32
|
+
n ,vyb :call <SNR>92_ActivateBuffers()<CR>
|
33
|
+
n ,vya :call <SNR>92_ActivateAll()<CR>
|
34
|
+
v ,vR <Plug>EgMapReplaceSelection_R
|
35
|
+
no ,vR <Plug>EgMapReplaceCurrentWord_R
|
36
|
+
v ,vr <Plug>EgMapReplaceSelection_r
|
37
|
+
no ,vr <Plug>EgMapReplaceCurrentWord_r
|
38
|
+
v ,vA <Plug>EgMapGrepSelection_A
|
39
|
+
no ,vA <Plug>EgMapGrepCurrentWord_A
|
40
|
+
v ,va <Plug>EgMapGrepSelection_a
|
41
|
+
no ,va <Plug>EgMapGrepCurrentWord_a
|
42
|
+
v ,vV <Plug>EgMapGrepSelection_V
|
43
|
+
no ,vV <Plug>EgMapGrepCurrentWord_V
|
44
|
+
v ,vv <Plug>EgMapGrepSelection_v
|
45
|
+
no ,vv <Plug>EgMapGrepCurrentWord_v
|
46
|
+
,vo <Plug>EgMapGrepOptions
|
47
|
+
n ,ig <Plug>IndentGuidesToggle
|
48
|
+
x ,ms * "my:TxSend(@m)<CR>
|
49
|
+
n ,mt * :TxSetRunCmd<CR>
|
50
|
+
n ,ms * :TxSend<CR>
|
51
|
+
n ,mr * :TxRun<CR>
|
52
|
+
n ,mq * :TxKill<CR>
|
53
|
+
n ,mp * :TxSetPane<CR>
|
54
|
+
n ,mn * :TxCreate<CR>
|
55
|
+
n ,mc * :TxClear<CR>
|
56
|
+
n ,mb * :TxSigInt<CR>
|
57
|
+
x ,Nr <Plug>NrrwrgnBangDo
|
58
|
+
x ,nr <Plug>NrrwrgnDo
|
59
|
+
n ,rs * :Dispatch bundle exec rspec<CR>
|
60
|
+
n ,a * :Ack<Space>
|
61
|
+
n ,rr * :wincmd w | edit | wincmd p<CR>
|
62
|
+
n ,rw * :%s/\s\+$//e<CR>:noh<CR>
|
63
|
+
n ,er * :Errors<CR>
|
64
|
+
n ,f * :CtrlPBuffer<CR>
|
65
|
+
n ,md * :%! /usr/local/bin/markdown --html4tags <CR>
|
66
|
+
,n * :call RenameFile()<CR>
|
67
|
+
v ,st * :sort<CR>
|
68
|
+
,y * "+y
|
69
|
+
,p * "+p
|
70
|
+
n ,, * <C-^>
|
71
|
+
n ,d * :Bdelete<CR>
|
72
|
+
n ,cu <Plug>CommentaryUndo
|
73
|
+
n ,c<Space> <Plug>CommentaryLine
|
74
|
+
n ,c <Plug>Commentary
|
75
|
+
x ,c <Plug>Commentary
|
76
|
+
n ,rb * :RainbowParenthesesToggle<CR>
|
77
|
+
n ,wr * :setl nowrap!<CR>:set wrap?<CR>
|
78
|
+
n ,l * :setl nolist!<CR>:set list?<CR>
|
79
|
+
,sn * :SyntasticToggleMode<CR>
|
80
|
+
n ,tr * :NERDTreeToggle<CR>
|
81
|
+
,pp * :set paste!<CR>:set paste?<CR>
|
82
|
+
,sp * :setlocal spell!<CR>:setlocal spell?<CR>
|
83
|
+
,te * :tabclose<CR>
|
84
|
+
,to * :tabonly<CR>
|
85
|
+
,tn :tabnew<CR>
|
86
|
+
n ,h * <C-W>s<C-W>j
|
87
|
+
n ,v * <C-W>v<C-W>l<C-W>L
|
88
|
+
v / * /\v
|
89
|
+
n / * /\v
|
90
|
+
n <p * :call <SNR>91_putline(']p')<CR><']
|
91
|
+
n <P * :call <SNR>91_putline('[p')<CR><']
|
92
|
+
v < * <gv
|
93
|
+
n =p * :call <SNR>91_putline(']p')<CR>=']
|
94
|
+
n =P * :call <SNR>91_putline('[p')<CR>=']
|
95
|
+
n >p * :call <SNR>91_putline(']p')<CR>>']
|
96
|
+
n >P * :call <SNR>91_putline('[p')<CR>>']
|
97
|
+
v > * >gv
|
98
|
+
x S <Plug>VSurround
|
99
|
+
n [xx <Plug>unimpaired_line_xml_encode
|
100
|
+
x [x <Plug>unimpaired_xml_encode
|
101
|
+
n [x <Plug>unimpaired_xml_encode
|
102
|
+
n [uu <Plug>unimpaired_line_url_encode
|
103
|
+
x [u <Plug>unimpaired_url_encode
|
104
|
+
n [u <Plug>unimpaired_url_encode
|
105
|
+
n [yy <Plug>unimpaired_line_string_encode
|
106
|
+
x [y <Plug>unimpaired_string_encode
|
107
|
+
n [y <Plug>unimpaired_string_encode
|
108
|
+
n [p <Plug>unimpairedPutAbove
|
109
|
+
n [ox * :set cursorline cursorcolumn<CR>
|
110
|
+
n [ow * :set wrap<CR>
|
111
|
+
n [os * :set spell<CR>
|
112
|
+
n [or * :set relativenumber<CR>
|
113
|
+
n [on * :set number<CR>
|
114
|
+
n [ol * :set list<CR>
|
115
|
+
n [oi * :set ignorecase<CR>
|
116
|
+
n [oh * :set hlsearch<CR>
|
117
|
+
n [od * :diffthis<CR>
|
118
|
+
n [ou * :set cursorcolumn<CR>
|
119
|
+
n [oc * :set cursorline<CR>
|
120
|
+
x [e <Plug>unimpairedMoveSelectionUp
|
121
|
+
n [e <Plug>unimpairedMoveUp
|
122
|
+
n [<Space> <Plug>unimpairedBlankUp
|
123
|
+
o [n <Plug>unimpairedContextPrevious
|
124
|
+
n [n <Plug>unimpairedContextPrevious
|
125
|
+
n [o <Plug>unimpairedOPrevious
|
126
|
+
n [f <Plug>unimpairedDirectoryPrevious
|
127
|
+
n [T <Plug>unimpairedTFirst
|
128
|
+
n [t <Plug>unimpairedTPrevious
|
129
|
+
n [<C-Q> <Plug>unimpairedQPFile
|
130
|
+
n [Q <Plug>unimpairedQFirst
|
131
|
+
n [q <Plug>unimpairedQPrevious
|
132
|
+
n [<C-L> <Plug>unimpairedLPFile
|
133
|
+
n [L <Plug>unimpairedLFirst
|
134
|
+
n [l <Plug>unimpairedLPrevious
|
135
|
+
n [B <Plug>unimpairedBFirst
|
136
|
+
n [b <Plug>unimpairedBPrevious
|
137
|
+
n [A <Plug>unimpairedAFirst
|
138
|
+
n [a <Plug>unimpairedAPrevious
|
139
|
+
n \\u <Plug>CommentaryUndo
|
140
|
+
n \\\ <Plug>CommentaryLine
|
141
|
+
n \\ <Plug>Commentary
|
142
|
+
x \\ <Plug>Commentary
|
143
|
+
n ]xx <Plug>unimpaired_line_xml_decode
|
144
|
+
x ]x <Plug>unimpaired_xml_decode
|
145
|
+
n ]x <Plug>unimpaired_xml_decode
|
146
|
+
n ]uu <Plug>unimpaired_line_url_decode
|
147
|
+
x ]u <Plug>unimpaired_url_decode
|
148
|
+
n ]u <Plug>unimpaired_url_decode
|
149
|
+
n ]yy <Plug>unimpaired_line_string_decode
|
150
|
+
x ]y <Plug>unimpaired_string_decode
|
151
|
+
n ]y <Plug>unimpaired_string_decode
|
152
|
+
n ]p <Plug>unimpairedPutBelow
|
153
|
+
n ]ox * :set nocursorline nocursorcolumn<CR>
|
154
|
+
n ]ow * :set nowrap<CR>
|
155
|
+
n ]os * :set nospell<CR>
|
156
|
+
n ]or * :set norelativenumber<CR>
|
157
|
+
n ]on * :set nonumber<CR>
|
158
|
+
n ]ol * :set nolist<CR>
|
159
|
+
n ]oi * :set noignorecase<CR>
|
160
|
+
n ]oh * :set nohlsearch<CR>
|
161
|
+
n ]od * :diffoff<CR>
|
162
|
+
n ]ou * :set nocursorcolumn<CR>
|
163
|
+
n ]oc * :set nocursorline<CR>
|
164
|
+
x ]e <Plug>unimpairedMoveSelectionDown
|
165
|
+
n ]e <Plug>unimpairedMoveDown
|
166
|
+
n ]<Space> <Plug>unimpairedBlankDown
|
167
|
+
o ]n <Plug>unimpairedContextNext
|
168
|
+
n ]n <Plug>unimpairedContextNext
|
169
|
+
n ]o <Plug>unimpairedONext
|
170
|
+
n ]f <Plug>unimpairedDirectoryNext
|
171
|
+
n ]T <Plug>unimpairedTLast
|
172
|
+
n ]t <Plug>unimpairedTNext
|
173
|
+
n ]<C-Q> <Plug>unimpairedQNFile
|
174
|
+
n ]Q <Plug>unimpairedQLast
|
175
|
+
n ]q <Plug>unimpairedQNext
|
176
|
+
n ]<C-L> <Plug>unimpairedLNFile
|
177
|
+
n ]L <Plug>unimpairedLLast
|
178
|
+
n ]l <Plug>unimpairedLNext
|
179
|
+
n ]B <Plug>unimpairedBLast
|
180
|
+
n ]b <Plug>unimpairedBNext
|
181
|
+
n ]A <Plug>unimpairedALast
|
182
|
+
n ]a <Plug>unimpairedANext
|
183
|
+
x a * <Esc>:<C-U>call TextObjectify(visualmode(),'a')<CR>
|
184
|
+
o a * :<C-U>call TextObjectify(v:operator,'a')<CR>
|
185
|
+
n cox * :set <C-R>=&cursorline && &cursorcolumn ? 'nocursorline nocursorcolumn' : 'cursorline cursorcolumn'<CR><CR>
|
186
|
+
n cow * :set <C-R>=<SNR>91_toggle("wrap")<CR><CR>
|
187
|
+
n cos * :set <C-R>=<SNR>91_toggle("spell")<CR><CR>
|
188
|
+
n cor * :set <C-R>=<SNR>91_toggle("relativenumber")<CR><CR>
|
189
|
+
n con * :set <C-R>=<SNR>91_toggle("number")<CR><CR>
|
190
|
+
n col * :set <C-R>=<SNR>91_toggle("list")<CR><CR>
|
191
|
+
n coi * :set <C-R>=<SNR>91_toggle("ignorecase")<CR><CR>
|
192
|
+
n coh * :set <C-R>=<SNR>91_toggle("hlsearch")<CR><CR>
|
193
|
+
n cod * :<C-R>=&diff ? 'diffoff' : 'diffthis'<CR><CR>
|
194
|
+
n cou * :set <C-R>=<SNR>91_toggle("cursorcolumn")<CR><CR>
|
195
|
+
n coc * :set <C-R>=<SNR>91_toggle("cursorline")<CR><CR>
|
196
|
+
n cs <Plug>Csurround
|
197
|
+
n ds <Plug>Dsurround
|
198
|
+
n gx <Plug>NetrwBrowseX
|
199
|
+
x gS <Plug>VgSurround
|
200
|
+
x g! <Plug>ScripteaseFilter
|
201
|
+
n g!! <Plug>ScripteaseFilter_
|
202
|
+
n g! <Plug>ScripteaseFilter
|
203
|
+
n gcu <Plug>CommentaryUndo
|
204
|
+
n gcc <Plug>CommentaryLine
|
205
|
+
n gc <Plug>Commentary
|
206
|
+
x gc <Plug>Commentary
|
207
|
+
n ga & :<C-U>echo <SNR>82_info(matchstr(getline('.')[col('.')-1:-1],'.'))<CR>
|
208
|
+
x i * <Esc>:<C-U>call TextObjectify(visualmode(),'i')<CR>
|
209
|
+
o i * :<C-U>call TextObjectify(v:operator,'i')<CR>
|
210
|
+
v j * gj
|
211
|
+
n j * gj
|
212
|
+
v k * gk
|
213
|
+
n k * gk
|
214
|
+
n ygI * :call <SNR>91_setup_paste()<CR>gI
|
215
|
+
n ygi * :call <SNR>91_setup_paste()<CR>gi
|
216
|
+
n yI * :call <SNR>91_setup_paste()<CR>I
|
217
|
+
n yA * :call <SNR>91_setup_paste()<CR>A
|
218
|
+
n yO * :call <SNR>91_setup_paste()<CR>O
|
219
|
+
n yo * :call <SNR>91_setup_paste()<CR>o
|
220
|
+
n yP * :call <SNR>91_setup_paste()<CR>i
|
221
|
+
n yp * :call <SNR>91_setup_paste()<CR>a
|
222
|
+
n ySS <Plug>YSsurround
|
223
|
+
n ySs <Plug>YSsurround
|
224
|
+
n yss <Plug>Yssurround
|
225
|
+
n yS <Plug>YSurround
|
226
|
+
n ys <Plug>Ysurround
|
227
|
+
n zS <Plug>ScripteaseSynnames
|
228
|
+
n <Plug>NetrwBrowseX * :call netrw#NetrwBrowseX(expand("<cWORD>"),0)<CR>
|
229
|
+
v <Plug>EgMapReplaceSelection_R & y:call <SNR>92_ReplaceSelection(1)<CR>
|
230
|
+
n <Plug>EgMapReplaceCurrentWord_R & :call <SNR>92_ReplaceCurrentWord(1)<CR>
|
231
|
+
v <Plug>EgMapReplaceSelection_r & y:call <SNR>92_ReplaceSelection(0)<CR>
|
232
|
+
n <Plug>EgMapReplaceCurrentWord_r & :call <SNR>92_ReplaceCurrentWord(0)<CR>
|
233
|
+
v <Plug>EgMapGrepSelection_A & y:call <SNR>92_GrepSelection("add", 1)<CR>
|
234
|
+
n <Plug>EgMapGrepCurrentWord_A & :call <SNR>92_GrepCurrentWord("add", 1)<CR>
|
235
|
+
v <Plug>EgMapGrepSelection_a & y:call <SNR>92_GrepSelection("add", 0)<CR>
|
236
|
+
n <Plug>EgMapGrepCurrentWord_a & :call <SNR>92_GrepCurrentWord("add", 0)<CR>
|
237
|
+
v <Plug>EgMapGrepSelection_V & y:call <SNR>92_GrepSelection("", 1)<CR>
|
238
|
+
n <Plug>EgMapGrepCurrentWord_V & :call <SNR>92_GrepCurrentWord("", 1)<CR>
|
239
|
+
v <Plug>EgMapGrepSelection_v & y:call <SNR>92_GrepSelection("", 0)<CR>
|
240
|
+
n <Plug>EgMapGrepCurrentWord_v & :call <SNR>92_GrepCurrentWord("", 0)<CR>
|
241
|
+
n <Plug>EgMapGrepOptions & :call <SNR>92_GrepOptions()<CR>
|
242
|
+
n <Plug>unimpaired_line_xml_decode * :<C-U>call <SNR>91_Transform("xml_decode",v:count1)<CR>
|
243
|
+
x <Plug>unimpaired_xml_decode * :<C-U>call <SNR>91_Transform("xml_decode",visualmode())<CR>
|
244
|
+
n <Plug>unimpaired_xml_decode * :<C-U>call <SNR>91_TransformSetup("xml_decode")<CR>g@
|
245
|
+
n <Plug>unimpaired_line_xml_encode * :<C-U>call <SNR>91_Transform("xml_encode",v:count1)<CR>
|
246
|
+
x <Plug>unimpaired_xml_encode * :<C-U>call <SNR>91_Transform("xml_encode",visualmode())<CR>
|
247
|
+
n <Plug>unimpaired_xml_encode * :<C-U>call <SNR>91_TransformSetup("xml_encode")<CR>g@
|
248
|
+
n <Plug>unimpaired_line_url_decode * :<C-U>call <SNR>91_Transform("url_decode",v:count1)<CR>
|
249
|
+
x <Plug>unimpaired_url_decode * :<C-U>call <SNR>91_Transform("url_decode",visualmode())<CR>
|
250
|
+
n <Plug>unimpaired_url_decode * :<C-U>call <SNR>91_TransformSetup("url_decode")<CR>g@
|
251
|
+
n <Plug>unimpaired_line_url_encode * :<C-U>call <SNR>91_Transform("url_encode",v:count1)<CR>
|
252
|
+
x <Plug>unimpaired_url_encode * :<C-U>call <SNR>91_Transform("url_encode",visualmode())<CR>
|
253
|
+
n <Plug>unimpaired_url_encode * :<C-U>call <SNR>91_TransformSetup("url_encode")<CR>g@
|
254
|
+
n <Plug>unimpaired_line_string_decode * :<C-U>call <SNR>91_Transform("string_decode",v:count1)<CR>
|
255
|
+
x <Plug>unimpaired_string_decode * :<C-U>call <SNR>91_Transform("string_decode",visualmode())<CR>
|
256
|
+
n <Plug>unimpaired_string_decode * :<C-U>call <SNR>91_TransformSetup("string_decode")<CR>g@
|
257
|
+
n <Plug>unimpaired_line_string_encode * :<C-U>call <SNR>91_Transform("string_encode",v:count1)<CR>
|
258
|
+
x <Plug>unimpaired_string_encode * :<C-U>call <SNR>91_Transform("string_encode",visualmode())<CR>
|
259
|
+
n <Plug>unimpaired_string_encode * :<C-U>call <SNR>91_TransformSetup("string_encode")<CR>g@
|
260
|
+
n <Plug>unimpairedPutBelow * :call <SNR>91_putline(']p')<CR>
|
261
|
+
n <Plug>unimpairedPutAbove * :call <SNR>91_putline('[p')<CR>
|
262
|
+
n <Plug>unimpairedPaste * :call <SNR>91_setup_paste()<CR>
|
263
|
+
<Plug>unimpairedMoveSelectionDown * :<C-U>call <SNR>91_MoveSelectionDown(v:count1)<CR>
|
264
|
+
<Plug>unimpairedMoveSelectionUp * :<C-U>call <SNR>91_MoveSelectionUp(v:count1)<CR>
|
265
|
+
n <Plug>unimpairedMoveDown * :<C-U>call <SNR>91_Move('+',v:count1,'Down')<CR>
|
266
|
+
n <Plug>unimpairedMoveUp * :<C-U>call <SNR>91_Move('--',v:count1,'Up')<CR>
|
267
|
+
n <Plug>unimpairedBlankDown * :<C-U>call <SNR>91_BlankDown(v:count1)<CR>
|
268
|
+
n <Plug>unimpairedBlankUp * :<C-U>call <SNR>91_BlankUp(v:count1)<CR>
|
269
|
+
o <Plug>unimpairedContextNext * :call <SNR>91_ContextMotion(0)<CR>
|
270
|
+
o <Plug>unimpairedContextPrevious * :call <SNR>91_ContextMotion(1)<CR>
|
271
|
+
n <Plug>unimpairedContextNext * :call <SNR>91_Context(0)<CR>
|
272
|
+
n <Plug>unimpairedContextPrevious * :call <SNR>91_Context(1)<CR>
|
273
|
+
n <Plug>unimpairedOPrevious <Plug>unimpairedDirectoryPrevious:echohl WarningMSG|echo "[o is deprecated. Use [f"|echohl NONE<CR>
|
274
|
+
n <Plug>unimpairedONext <Plug>unimpairedDirectoryNext:echohl WarningMSG|echo "]o is deprecated. Use ]f"|echohl NONE<CR>
|
275
|
+
n <Plug>unimpairedDirectoryPrevious * :<C-U>edit <C-R>=<SNR>91_fnameescape(<SNR>91_FileByOffset(-v:count1))<CR><CR>
|
276
|
+
n <Plug>unimpairedDirectoryNext * :<C-U>edit <C-R>=<SNR>91_fnameescape(<SNR>91_FileByOffset(v:count1))<CR><CR>
|
277
|
+
n <Plug>unimpairedTLast * :<C-U>exe "".(v:count ? v:count : "")."tlast"<CR>
|
278
|
+
n <Plug>unimpairedTFirst * :<C-U>exe "".(v:count ? v:count : "")."tfirst"<CR>
|
279
|
+
n <Plug>unimpairedTNext * :<C-U>exe "".(v:count ? v:count : "")."tnext"<CR>
|
280
|
+
n <Plug>unimpairedTPrevious * :<C-U>exe "".(v:count ? v:count : "")."tprevious"<CR>
|
281
|
+
n <Plug>unimpairedQNFile * :<C-U>exe "".(v:count ? v:count : "")."cnfile"<CR>
|
282
|
+
n <Plug>unimpairedQPFile * :<C-U>exe "".(v:count ? v:count : "")."cpfile"<CR>
|
283
|
+
n <Plug>unimpairedQLast * :<C-U>exe "".(v:count ? v:count : "")."clast"<CR>
|
284
|
+
n <Plug>unimpairedQFirst * :<C-U>exe "".(v:count ? v:count : "")."cfirst"<CR>
|
285
|
+
n <Plug>unimpairedQNext * :<C-U>exe "".(v:count ? v:count : "")."cnext"<CR>
|
286
|
+
n <Plug>unimpairedQPrevious * :<C-U>exe "".(v:count ? v:count : "")."cprevious"<CR>
|
287
|
+
n <Plug>unimpairedLNFile * :<C-U>exe "".(v:count ? v:count : "")."lnfile"<CR>
|
288
|
+
n <Plug>unimpairedLPFile * :<C-U>exe "".(v:count ? v:count : "")."lpfile"<CR>
|
289
|
+
n <Plug>unimpairedLLast * :<C-U>exe "".(v:count ? v:count : "")."llast"<CR>
|
290
|
+
n <Plug>unimpairedLFirst * :<C-U>exe "".(v:count ? v:count : "")."lfirst"<CR>
|
291
|
+
n <Plug>unimpairedLNext * :<C-U>exe "".(v:count ? v:count : "")."lnext"<CR>
|
292
|
+
n <Plug>unimpairedLPrevious * :<C-U>exe "".(v:count ? v:count : "")."lprevious"<CR>
|
293
|
+
n <Plug>unimpairedBLast * :<C-U>exe "".(v:count ? v:count : "")."blast"<CR>
|
294
|
+
n <Plug>unimpairedBFirst * :<C-U>exe "".(v:count ? v:count : "")."bfirst"<CR>
|
295
|
+
n <Plug>unimpairedBNext * :<C-U>exe "".(v:count ? v:count : "")."bnext"<CR>
|
296
|
+
n <Plug>unimpairedBPrevious * :<C-U>exe "".(v:count ? v:count : "")."bprevious"<CR>
|
297
|
+
n <Plug>unimpairedALast * :<C-U>exe "".(v:count ? v:count : "")."last"<CR>
|
298
|
+
n <Plug>unimpairedAFirst * :<C-U>exe "".(v:count ? v:count : "")."first"<CR>
|
299
|
+
n <Plug>unimpairedANext * :<C-U>exe "".(v:count ? v:count : "")."next"<CR>
|
300
|
+
n <Plug>unimpairedAPrevious * :<C-U>exe "".(v:count ? v:count : "")."previous"<CR>
|
301
|
+
v <Plug>VgSurround * :<C-U>call <SNR>90_opfunc(visualmode(),visualmode() ==# 'V' ? 0 : 1)<CR>
|
302
|
+
v <Plug>VSurround * :<C-U>call <SNR>90_opfunc(visualmode(),visualmode() ==# 'V' ? 1 : 0)<CR>
|
303
|
+
n <Plug>YSurround * :<C-U>set opfunc=<SNR>90_opfunc2<CR>g@
|
304
|
+
n <Plug>Ysurround * :<C-U>set opfunc=<SNR>90_opfunc<CR>g@
|
305
|
+
n <Plug>YSsurround * :<C-U>call <SNR>90_opfunc2(v:count1)<CR>
|
306
|
+
n <Plug>Yssurround * :<C-U>call <SNR>90_opfunc(v:count1)<CR>
|
307
|
+
n <Plug>Csurround * :<C-U>call <SNR>90_changesurround()<CR>
|
308
|
+
n <Plug>Dsurround * :<C-U>call <SNR>90_dosurround(<SNR>90_inputtarget())<CR>
|
309
|
+
n <Plug>SurroundRepeat * .
|
310
|
+
n <Plug>ScripteaseSynnames * :<C-U>exe <SNR>89_zS(v:count)<CR>
|
311
|
+
x <Plug>ScripteaseFilter * :<C-U>call <SNR>89_filterop(visualmode())<CR>
|
312
|
+
n <Plug>ScripteaseFilter * :<C-U>set opfunc=<SNR>89_filterop<CR>g@
|
313
|
+
n <Plug>CommentaryUndo * :<C-U>call <SNR>83_undo()<CR>
|
314
|
+
n <Plug>CommentaryLine * :<C-U>set opfunc=<SNR>83_go|exe 'norm! 'v:count1.'g@_'<CR>
|
315
|
+
n <Plug>Commentary * :<C-U>set opfunc=<SNR>83_go<CR>g@
|
316
|
+
x <Plug>Commentary * :<C-U>call <SNR>83_go(line("'<"),line("'>"))<CR>
|
317
|
+
n <Plug>IndentGuidesDisable & :IndentGuidesDisable<CR>
|
318
|
+
n <Plug>IndentGuidesEnable & :IndentGuidesEnable<CR>
|
319
|
+
n <Plug>IndentGuidesToggle & :IndentGuidesToggle<CR>
|
320
|
+
x <SNR>38_VisualNrrwBang * :<C-U>call nrrwrgn#NrrwRgn(visualmode(),'!')<CR>
|
321
|
+
x <SNR>38_VisualNrrwRgn * :<C-U>call nrrwrgn#NrrwRgn(visualmode(),'')<CR>
|
322
|
+
x <Plug>NrrwrgnBangDo & <SNR>38_VisualNrrwBang
|
323
|
+
x <Plug>NrrwrgnDo & <SNR>38_VisualNrrwRgn
|
324
|
+
n <F10> * :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
|
325
|
+
n <F8> * :TagbarToggle<CR>
|
326
|
+
v <BS> "-d
|
327
|
+
v <D-x> "*d
|
328
|
+
v <D-c> "*y
|
329
|
+
v <D-v> "-d"*P
|
330
|
+
n <D-v> "*P
|
data/lib/vmaps.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require "vmaps/version"
|
2
|
+
require "vmaps/parser"
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Vmaps
|
6
|
+
class Main
|
7
|
+
def initialize(source=nil)
|
8
|
+
if source == nil
|
9
|
+
puts "No source given."
|
10
|
+
exit 1
|
11
|
+
end
|
12
|
+
parser = Parser.new(source)
|
13
|
+
|
14
|
+
@mappings = parser.parse_to_mappings()
|
15
|
+
end
|
16
|
+
|
17
|
+
def output_json
|
18
|
+
puts JSON.dump @mappings
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require "json"
|
2
|
+
|
3
|
+
module Vmaps
|
4
|
+
class Mapping
|
5
|
+
attr_accessor :mode, :lhs, :set_from, :rhs, :special
|
6
|
+
|
7
|
+
def to_s
|
8
|
+
"#{@lhs}\n #{@rhs}\n #{@mode}\n #{@set_from}\n\n"
|
9
|
+
end
|
10
|
+
|
11
|
+
def to_json(wat)
|
12
|
+
{
|
13
|
+
mode: @mode,
|
14
|
+
lhs: @lhs,
|
15
|
+
rhs: @rhs,
|
16
|
+
set_from: @set_from,
|
17
|
+
special: @special
|
18
|
+
}.to_json
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/vmaps/parser.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require "vmaps/mapping"
|
2
|
+
|
3
|
+
module Vmaps
|
4
|
+
class Parser
|
5
|
+
def initialize source
|
6
|
+
@source = source.split("\n")
|
7
|
+
end
|
8
|
+
|
9
|
+
def parse_to_mappings
|
10
|
+
mappings = Array.new
|
11
|
+
mapping = Mapping.new
|
12
|
+
@source.each do |line|
|
13
|
+
if line[0] == "\t"
|
14
|
+
mapping.set_from = line.sub("\tLast set from ", '')
|
15
|
+
mappings << mapping
|
16
|
+
mapping = Mapping.new
|
17
|
+
else
|
18
|
+
mapping.mode = line[0..2].strip
|
19
|
+
mapping.mode = 'nvxso' if mapping.mode.empty?
|
20
|
+
parts = line[3..-1].split(' ')
|
21
|
+
|
22
|
+
mapping.lhs = parts.shift
|
23
|
+
if parts.first.start_with?('*', '&', '@')
|
24
|
+
mapping.special = parts.shift
|
25
|
+
end
|
26
|
+
mapping.rhs = parts.join()
|
27
|
+
end
|
28
|
+
end
|
29
|
+
return mappings
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/vmaps.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'vmaps/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "vmaps"
|
8
|
+
spec.version = Vmaps::VERSION
|
9
|
+
spec.authors = ["Mike Anderson"]
|
10
|
+
spec.email = ["athaeryn@me.com"]
|
11
|
+
spec.description = %q{List your vim mappings.}
|
12
|
+
spec.summary = %q{This is a gem to list your vim mappings.}
|
13
|
+
# spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vmaps
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mike Anderson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-12-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: List your vim mappings.
|
42
|
+
email:
|
43
|
+
- athaeryn@me.com
|
44
|
+
executables:
|
45
|
+
- vmaps_dump
|
46
|
+
- vmaps_json
|
47
|
+
extensions: []
|
48
|
+
extra_rdoc_files: []
|
49
|
+
files:
|
50
|
+
- ".gitignore"
|
51
|
+
- Gemfile
|
52
|
+
- LICENSE.txt
|
53
|
+
- README.md
|
54
|
+
- Rakefile
|
55
|
+
- bin/vmaps_dump
|
56
|
+
- bin/vmaps_json
|
57
|
+
- derp.txt
|
58
|
+
- lib/vmaps.rb
|
59
|
+
- lib/vmaps/mapping.rb
|
60
|
+
- lib/vmaps/parser.rb
|
61
|
+
- lib/vmaps/version.rb
|
62
|
+
- vmaps.gemspec
|
63
|
+
homepage:
|
64
|
+
licenses:
|
65
|
+
- MIT
|
66
|
+
metadata: {}
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options: []
|
69
|
+
require_paths:
|
70
|
+
- lib
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
requirements: []
|
82
|
+
rubyforge_project:
|
83
|
+
rubygems_version: 2.1.9
|
84
|
+
signing_key:
|
85
|
+
specification_version: 4
|
86
|
+
summary: This is a gem to list your vim mappings.
|
87
|
+
test_files: []
|