-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc.menu
432 lines (418 loc) · 22.6 KB
/
.vimrc.menu
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
" Modeline and Notes {
" vim: set sw=4 ts=4 sts=4 et tw=78 foldmarker={,} foldlevel=0 foldmethod=marker :
" __ _ ____ _ _ _
" // \\/ |/__ || | ____| | __ __(_)_ __ ___
" \\__//| | / / | | / __/| | _____\ \ / /| | '_ ` _ \
" // \\| | / /_ | | | |_ | ||_____|\ V / | | | | | | |
" \\__//|_|/____||_| \___\|_| \_/ |_|_| |_| |_|
"
" This is the personal .vimrc file of 812lcl.
" You can find me at http://812lcl.com
" }
" unite menu {
" let s:menus = {}
" let s:menus.vim = {
" \ 'description': 'Vim',
" \ }
" let s:menus.vim.file_candidates = [
" \ [' > Edit configuation file (init.vim)', '~/.config/nvim/init.vim']
" \ ]
" call denite#custom#var('menu', 'menus', s:menus)
let g:unite_source_menu_menus = {}
nnoremap <LocalLeader>m :Unite menu<CR>
" }
" navigation {
let g:unite_source_menu_menus.navigation = {
\ 'description' : ' navigate by buffers, tabs & windows
\ Map: <Space>n',
\}
let g:unite_source_menu_menus.navigation.command_candidates = [
\['> buffers Map: ,b',
\'Unite buffer'],
\['> tabs Map: ',
\'Unite tab'],
\['> windows Map: ',
\'Unite window'],
\['> location list Map: <Space>x',
\'Unite location_list'],
\['> quickfix Map: <Space>z',
\'Unite quickfix'],
\['> next buffer Map: K',
\'bnext'],
\['> prev buffer Map: J',
\'bprevious'],
\['> delete buffer Map: :bd',
\'bd'],
\['> next tab Map: ',
\'tabn'],
\['> prev tab Map: ',
\'tabp'],
\['> NERDTree (NERDTRee) Map: ,wf',
\'NERDTreeToggle'],
\['> NERDTreeFind (NERDTRee) Map: ,w',
\'NERDTreeFind'],
\['> new vertical window Map: <C-w>v',
\'vsplit'],
\['> new horizontal window Map: <C-w>s',
\'split'],
\['> toggle quickfix window Map: :cw',
\'cw'],
\['> close current window Map: :c',
\'close'],
\]
nnoremap <LocalLeader>n :Unite menu:navigation<CR>
" }
" bookmarks {
let g:unite_source_menu_menus.bookmarks = {
\ 'description' : ' bookmarks
\ Map: <Space>b',
\}
let g:unite_source_menu_menus.bookmarks.command_candidates = [
\['> Unite open bookmarks Map: ',
\'Unite bookmark:*'],
\['> Unite add bookmark Map: ',
\'UniteBookmarkAdd'],
\['> Text add mark Map: m[a-zA-Z]',
\'normal m,'],
\['> Add next mark (vim-signature) Map: m,',
\'normal m,'],
\['> Next mark (vim-signature) Map: ]`',
\'normal ]`'],
\['> Prev mark (vim-signature) Map: [`',
\'normal [`'],
\['> Clear mark (vim-signature) Map: m<Space>',
\'normal m '],
\]
nnoremap <LocalLeader>b :Unite menu:bookmarks<CR>
" }
" cscope {
let g:unite_source_menu_menus.cscope = {
\ 'description' : ' cscope
\ Map: <Space>e',
\}
let g:unite_source_menu_menus.cscope.command_candidates = [
\['> find definition (cscope) Map: ,,g',
\'normal ,,g'],
\['> find call it (cscope) Map: ,,c',
\'normal ,,c'],
\['> find it call (cscope) Map: ,,d',
\'normal ,,d'],
\['> find c symbol (cscope) Map: ,,s',
\'normal ,,s'],
\['> find word (cscope) Map: ,,4',
\'normal ,,4'],
\['> egrep word (cscope) Map: ,,6',
\'normal ,,6'],
\['> find file (cscope) Map: ,,7',
\'normal ,,7'],
\['> find include this file (cscope) Map: ,,8',
\'normal ,,8'],
\]
nnoremap <LocalLeader>e :Unite menu:cscope<CR>
" }
" code {
let g:unite_source_menu_menus.code = {
\ 'description' : ' coding
\ Map: <Space>c',
\}
let g:unite_source_menu_menus.code.command_candidates = [
\['> Edit snippets (UltiSnips) Map: ',
\':UltiSnipsEdit'],
\['> Edit all snippets (UltiSnips) Map: ',
\':UltiSnipsEdit!'],
\['> Count lines of code Map: ',
\'Unite -default-action= output:call\\ LinesOfCode()'],
\['> Toggle indent lines (indent-guides) Map: ,g',
\'IndentLinesToggle'],
\['> Tagbar (Tagbar) Map: ,e',
\'Tagbar'],
\['> Syntastic check (syntastic) Map: ,i',
\'normal ,i'],
\['> Comment current line (nerdcommenter) Map: ,cc',
\'normal ,cc'],
\['> Same as cc but forces nesting (nerdcommenter) Map: ,cn',
\'normal ,cn'],
\['> Uncomment current line (nerdcommenter) Map: ,cu',
\'normal ,cu'],
\['> Comment sexily (nerdcommenter) Map: ,cs',
\'normal ,cs'],
\['> Comment using one set (nerdcommenter) Map: ,cm',
\'normal ,cm'],
\['> show emmet tutorial (emmet-vim) Map: ',
\'h emmet-tutorial'],
\]
nnoremap <LocalLeader>c :Unite menu:code<CR>
" }
" files {
let g:unite_source_menu_menus.files = {
\ 'description' : ' files & dirs
\ Map: <Space>f',
\}
let g:unite_source_menu_menus.files.command_candidates = [
\['> open file Map: ',
\'Unite -start-insert file'],
\['> open file with recursive search Map: ,f',
\'Unite -start-insert file_rec/async'],
\['> session list Map: <Space>y',
\':SessionList'],
\['> session save Map: <Space>u',
\':SessionSave'],
\['> session close Map: <Space>i',
\':SessionClose'],
\['> search directory Map: ',
\'Unite -start-insert directory'],
\['> search directory with recursive search Map: ,fd',
\'Unite -start-insert directory_rec/async'],
\['> edit new file Map: ',
\'Unite -start-insert file/new'],
\['> make new directory Map: ',
\'Unite -start-insert directory/new'],
\['> change working directory Map: ',
\'Unite -default-action=lcd directory'],
\['> know current working directory Map: ',
\'Unite output:pwd'],
\['> search recently used files Map: ,fr',
\'Unite -start-insert file_mru'],
\['> search recently used directories Map: ,dr',
\'Unite -start-insert directory_mru'],
\['> save as root Map: :w!!',
\'exe "write !sudo tee % >/dev/null"'],
\['> open ranger Map: <Space>r',
\'call RangerChooser()'],
\]
nnoremap <LocalLeader>f :Unite menu:files<CR>
" }
" git {
let g:unite_source_menu_menus.git = {
\ 'description' : ' admin git repositories
\ Map: <Space>g',
\}
let g:unite_source_menu_menus.git.command_candidates = [
\['> git diff (fugitive) Map: ,gd',
\'Gvdiff'],
\['> git blame (fugitive) Map: ,gb',
\'Gblame'],
\['> git log (fugitive) Map: ,gl',
\'exe "silent Glog | Unite -no-quit quickfix"'],
\['> git init (fugitive) Map: ,gn',
\'Unite output:echo\ system("git\ init")'],
\['> git status (fugitive) Map: ,gs',
\'Gstatus'],
\['> git commit (fugitive) Map: ,gc',
\'Gcommit'],
\['> git log - all (fugitive) Map: ,gL',
\'exe "silent Glog -all | Unite -no-quit quickfix"'],
\['> git add/stage (fugitive) Map: ,gw',
\'Gwrite'],
\['> git checkout (fugitive) Map: ,go',
\'Gread'],
\['> git rm (fugitive) Map: ,gR',
\'Gremove'],
\['> git mv (fugitive) Map: ,gm',
\'exe "Gmove " input("destino: ")'],
\['> git push (fugitive) Map: ,gp',
\'Git! push'],
\['> git pull (fugitive) Map: ,gP',
\'Git! pull'],
\['> git command (fugitive) Map: ,gi',
\'exe "Git! " input("comando git: ")'],
\['> git edit (fugitive) Map: ,gE',
\'exe "command Gedit " input(":Gedit ")'],
\['> git grep (fugitive) Map: ,gg',
\'exe "silent Ggrep -i ".input("Pattern: ") | Unite -no-quit quickfix'],
\['> git grep - messages (fugitive) Map: ,ggm',
\'exe "silent Glog --grep=".input("Pattern: ")." | Unite -no-quit quickfix"'],
\['> git grep - text (fugitive) Map: ,ggt',
\'exe "silent Glog -S".input("Pattern: ")." | Unite -no-quit quickfix"'],
\['> git cd (fugitive) Map: ,gcd',
\'Gcd'],
\['> git lcd (fugitive) Map: ,glc',
\'Glcd'],
\['> git browse (fugitive) Map: ,gB',
\'Gbrowse'],
\['> github issues & PR (fugitive) Map: ,gS',
\'normal ,gS'],
\['> next hunk (vim-signify) Map: gh',
\'GitGutterNextHunk'],
\['> prev hunk (vim-signify) Map: hg',
\'GitGutterPrevHunk'],
\]
nnoremap <LocalLeader>g :Unite menu:git<CR>
" }
" history {
let g:unite_source_menu_menus.history = {
\ 'description' : ' yanks, registers & history
\ Map: <Space>h',
\}
let g:unite_source_menu_menus.history.command_candidates = [
\['> registers Map: <Space>q',
\'Unite register'],
\['> messages Map: ',
\'Unite output:messages'],
\['> search changes Map: ',
\'Unite change'],
\['> search jumps Map: ',
\'Unite jump'],
\['> search tasks Map: ,t',
\'TaskList'],
\['> undo tree (Undotree) Map: ,q',
\'UndotreeToggle'],
\]
nnoremap <LocalLeader>h :Unite menu:history<CR>
" }
" searching {
let g:unite_source_menu_menus.searching = {
\ 'description' : ' searchs inside the current buffer
\ Map: <Space>s',
\}
let g:unite_source_menu_menus.searching.command_candidates = [
\['> search line Map: ',
\'Unite -auto-preview -start-insert line'],
\['> search word under the cursor in current buffer Map: ',
\'UniteWithCursorWord -auto-preview -winheight=25 -no-quit line'],
\['> grep (ag → ack → grep) Map: ,A',
\'Unite -auto-preview -winheight=25 -no-quit grep'],
\['> grep current word Map: ,a',
\'UniteWithCursorWord -auto-preview -winheight=25 -no-quit grep'],
\['> search marks Map: ,k',
\'Unite -auto-preview -winheight=25 mark'],
\['> find Map: ',
\'Unite find'],
\['> vimgrep (very slow) Map: ',
\'Unite vimgrep'],
\['> trigger easymotion (easymotion) Map: ,,',
\''],
\]
nnoremap <LocalLeader>s :Unite menu:searching<CR>
" }
" text {
let g:unite_source_menu_menus.text = {
\ 'description' : ' text edition
\ Map: <Space>t',
\}
let g:unite_source_menu_menus.text.command_candidates = [
\['> toggle search results highlight Map: ,h',
\'normal ,h'],
\['> toggle nu or rnu Map: ,s',
\'normal ,s'],
\['> spell check Map: ,p',
\'normal ,p'],
\['> toggle fold Map: <Space>o',
\'normal <Space>o'],
\['> FencAutoDetect (fencview) Map: ,m',
\'FencAutoDetect'],
\['> toggle surround in visualmode (surround) Map: S',
\'visual S'],
\['> add surroundings in visualmode (surround) Map: ys',
\''],
\['> change surroundings in visualmode (surround) Map: cs',
\''],
\['> delete surroundings in visualmode (surround) Map: ds',
\''],
\]
nnoremap <LocalLeader>t :Unite menu:text<CR>
" }
" EasyAlign {
let g:unite_source_menu_menus.EasyAlign = {
\ 'description' : ' EasyAlign
\ Map: <Space>a',
\}
let g:unite_source_menu_menus.EasyAlign.command_candidates = [
\['> Json tool Map: ,jt',
\'normal ,jt'],
\['> EasyAlign = Map: <Enter>=',
\'EasyAlign ='],
\['> EasyAlign *= Map: <Enter>*=',
\'EasyAlign *='],
\['> EasyAlign **= Map: <Enter>**=',
\'EasyAlign **='],
\['> EasyAlign 2= Map: <Enter>2=',
\'EasyAlign 2='],
\['> EasyAlign =< Map: <Enter><Right>=',
\'EasyAlign =<'],
\['> EasyAlign : Map: <Enter>:',
\'EasyAlign :'],
\['> EasyAlign # Map: <Enter>#',
\'EasyAlign #'],
\['> EasyAlign , Map: <Enter>,',
\'EasyAlign ,'],
\['> EasyAlign & Map: <Enter>&',
\'EasyAlign &'],
\['> EasyAlign <Bar> Map: <Enter><Bar>',
\'EasyAlign <Bar>'],
\]
nnoremap <LocalLeader>a :Unite menu:EasyAlign<CR>
" }
" vim {
let g:unite_source_menu_menus.vim = {
\ 'description' : ' vim
\ Map: <Space>v',
\}
let g:unite_source_menu_menus.vim.command_candidates = [
\['> edit configuration file (vimrc) Map: ',
\'edit $MYVIMRC'],
\['> edit plugin configuration file Map: ',
\'edit ~/.vimrc.plugins'],
\['> edit menu configuration file Map: ',
\'edit ~/.vimrc.menu'],
\['> choose colorscheme Map: ',
\'Unite colorscheme -auto-preview'],
\['> mappings Map: ',
\'Unite mapping -start-insert'],
\['> vim commands Map: ',
\'Unite -start-insert command'],
\['> vim functions Map: ',
\'Unite -start-insert function'],
\['> vim runtimepath Map: ',
\'Unite -start-insert runtimepath'],
\['> vim command output Map: ',
\'Unite output'],
\['> unite sources Map: ',
\'Unite source'],
\['> kill process Map: ',
\'Unite -default-action=sigkill -start-insert process'],
\['> launch executable (dmenu like) Map: ',
\'Unite -start-insert launcher'],
\]
nnoremap <LocalLeader>v :Unite menu:vim<CR>
" }
" markdown {
let g:unite_source_menu_menus.markdown = {
\ 'description' : ' preview markdown extra docs
\ Map: <Space>k',
\}
let g:unite_source_menu_menus.markdown.command_candidates = [
\['> Preview (vim-xmark) Map: ',
\':Xmark'],
\['> On the right (vim-xmark) Map: ',
\':Xmark>'],
\['> On the left (vim-xmark) Map: ',
\':Xmark<'],
\['> On the top (vim-xmark) Map: ',
\':Xmark+'],
\['> On the bottom (vim-xmark) Map: ',
\':Xmark-'],
\['> Turn off Xmark (vim-xmark) Map: ',
\':Xmark!'],
\]
nnoremap <LocalLeader>k :Unite -silent menu:markdown<CR>
" }
" web {
let g:unite_source_menu_menus.vimplug = {
\ 'description' : ' vim plugins
\ Map: <Space>w',
\}
let g:unite_source_menu_menus.vimplug.command_candidates = [
\['> Plug install (vim-plug) Map: ',
\':PlugInstall'],
\['> Plug update (vim-plug) Map: ',
\':PlugUpdate'],
\['> Plug remove (vim-plug) Map: ',
\':PlugClean'],
\['> Plug status (vim-plug) Map: ',
\':PlugStatus'],
\['> Update vim-plug (vim-plug) Map: ',
\':PlugUpgrade'],
\]
nnoremap <LocalLeader>w :Unite -silent menu:vimplug<CR>
" }