forked from rafi/vim-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathall.vim
More file actions
373 lines (324 loc) · 12.1 KB
/
all.vim
File metadata and controls
373 lines (324 loc) · 12.1 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
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
" Plugin Settings
"---------------------------------------------------------
if dein#tap('denite.nvim')
nnoremap <silent><LocalLeader>r :<C-u>Denite -resume -refresh -no-start-filter<CR>
nnoremap <silent><LocalLeader>f :<C-u>Denite file/rec<CR>
nnoremap <silent><LocalLeader>b :<C-u>Denite buffer file_mru -default-action=switch<CR>
nnoremap <silent><LocalLeader>d :<C-u>Denite directory_rec directory_mru -default-action=cd<CR>
nnoremap <silent><LocalLeader>v :<C-u>Denite neoyank -buffer-name=register<CR>
xnoremap <silent><LocalLeader>v :<C-u>Denite neoyank -buffer-name=register -default-action=replace<CR>
nnoremap <silent><LocalLeader>l :<C-u>Denite location_list -buffer-name=list<CR>
nnoremap <silent><LocalLeader>q :<C-u>Denite quickfix -buffer-name=list<CR>
nnoremap <silent><LocalLeader>n :<C-u>Denite dein<CR>
nnoremap <silent><LocalLeader>g :<C-u>Denite grep -no-start-filter<CR>
nnoremap <silent><LocalLeader>j :<C-u>Denite jump change file/point -buffer-name=jump<CR>
nnoremap <silent><LocalLeader>u :<C-u>Denite junkfile:new junkfile<CR>
nnoremap <silent><LocalLeader>o :<C-u>Denite outline<CR>
nnoremap <silent><LocalLeader>s :<C-u>Denite session -buffer-name=list<CR>
nnoremap <silent><LocalLeader>t :<C-u>Denite -buffer-name=tag tag:include<CR>
nnoremap <silent><LocalLeader>p :<C-u>Denite jump -buffer-name=jump<CR>
nnoremap <silent><LocalLeader>h :<C-u>Denite help<CR>
nnoremap <silent><LocalLeader>m :<C-u>Denite file/rec -buffer-name=memo -path=~/docs/books<CR>
" nnoremap <silent><LocalLeader>m :<C-u>Denite mpc -buffer-name=mpc<CR>
nnoremap <silent><LocalLeader>z :<C-u>Denite z<CR>
nnoremap <silent><LocalLeader>/ :<C-u>Denite line -start-filter<CR>
nnoremap <silent><LocalLeader>* :<C-u>DeniteCursorWord line<CR>
nnoremap <silent><LocalLeader>; :<C-u>Denite command command_history<CR>
" chemzqm/denite-git
nnoremap <silent> <Leader>gl :<C-u>Denite gitlog:all -no-start-filter<CR>
nnoremap <silent> <Leader>gs :<C-u>Denite gitstatus -no-start-filter<CR>
nnoremap <silent> <Leader>gc :<C-u>Denite gitbranch -no-start-filter<CR>
" Open Denite with word under cursor or selection
nnoremap <silent> <Leader>gt :DeniteCursorWord tag:include -buffer-name=tag -immediately<CR>
nnoremap <silent> <Leader>gf :DeniteCursorWord file/rec<CR>
nnoremap <silent> <Leader>gg :DeniteCursorWord grep -buffer-name=search<CR>
vnoremap <silent> <Leader>gg
\ :<C-u>call <SID>get_selection('/')<CR>
\ :execute 'Denite -buffer-name=search grep:::'.@/<CR><CR>
function! s:get_selection(cmdtype)
let temp = @s
normal! gv"sy
let @/ = substitute(escape(@s, '\' . a:cmdtype), '\n', '\\n', 'g')
let @s = temp
endfunction
endif
if dein#tap('defx.nvim')
nnoremap <silent> <LocalLeader>e
\ :<C-u>Defx -resume -toggle -buffer-name=tab`tabpagenr()`<CR>
nnoremap <silent> <LocalLeader>a
\ :<C-u>Defx -resume -buffer-name=tab`tabpagenr()` -search=`expand('%:p')`<CR>
endif
if dein#tap('vim-denite-z')
command! -nargs=+ -complete=file Z
\ call denite#start([{'name': 'z', 'args': [<q-args>], {'immediately': 1}}])
endif
if dein#tap('vista.vim')
nnoremap <silent> <Leader>o :<C-u>Vista<CR>
endif
if dein#tap('neosnippet.vim')
imap <expr><C-o> neosnippet#expandable_or_jumpable()
\ ? "\<Plug>(neosnippet_expand_or_jump)" : "\<ESC>o"
smap <silent>L <Plug>(neosnippet_jump_or_expand)
xmap <silent>L <Plug>(neosnippet_expand_target)
endif
if dein#tap('emmet-vim')
autocmd user_events FileType html,css,jsx,javascript,javascript.jsx
\ EmmetInstall
\ | imap <buffer> <C-Return> <Plug>(emmet-expand-abbr)
endif
if dein#tap('vim-sandwich')
nmap <silent> sa <Plug>(operator-sandwich-add)
xmap <silent> sa <Plug>(operator-sandwich-add)
omap <silent> sa <Plug>(operator-sandwich-g@)
nmap <silent> sd <Plug>(operator-sandwich-delete)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)
xmap <silent> sd <Plug>(operator-sandwich-delete)
nmap <silent> sr <Plug>(operator-sandwich-replace)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)
xmap <silent> sr <Plug>(operator-sandwich-replace)
nmap <silent> sdb <Plug>(operator-sandwich-delete)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-auto-a)
nmap <silent> srb <Plug>(operator-sandwich-replace)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-auto-a)
omap ib <Plug>(textobj-sandwich-auto-i)
xmap ib <Plug>(textobj-sandwich-auto-i)
omap ab <Plug>(textobj-sandwich-auto-a)
xmap ab <Plug>(textobj-sandwich-auto-a)
omap is <Plug>(textobj-sandwich-query-i)
xmap is <Plug>(textobj-sandwich-query-i)
omap as <Plug>(textobj-sandwich-query-a)
xmap as <Plug>(textobj-sandwich-query-a)
endif
if dein#tap('vim-operator-replace')
xmap p <Plug>(operator-replace)
endif
if dein#tap('vim-operator-flashy')
map y <Plug>(operator-flashy)
nmap Y <Plug>(operator-flashy)$
endif
if dein#tap('vim-niceblock')
silent! xmap I <Plug>(niceblock-I)
silent! xmap gI <Plug>(niceblock-gI)
silent! xmap A <Plug>(niceblock-A)
endif
if dein#tap('accelerated-jk')
nmap <silent>j <Plug>(accelerated_jk_gj)
nmap <silent>k <Plug>(accelerated_jk_gk)
endif
if dein#tap('vim-edgemotion')
map gj <Plug>(edgemotion-j)
map gk <Plug>(edgemotion-k)
xmap gj <Plug>(edgemotion-j)
xmap gk <Plug>(edgemotion-k)
endif
if dein#tap('vim-quickhl')
nmap mt <Plug>(quickhl-manual-this)
xmap mt <Plug>(quickhl-manual-this)
endif
if dein#tap('vim-sidemenu')
nmap <Leader>l <Plug>(sidemenu)
xmap <Leader>l <Plug>(sidemenu-visual)
endif
if dein#tap('vim-indent-guides')
nmap <silent><Leader>ti :<C-u>IndentGuidesToggle<CR>
endif
if dein#tap('vim-signature')
let g:SignatureMap = {
\ 'Leader': 'm',
\ 'ListBufferMarks': 'm/',
\ 'ListBufferMarkers': 'm?',
\ 'PlaceNextMark': 'm,',
\ 'ToggleMarkAtLine': 'mm',
\ 'PurgeMarksAtLine': 'm-',
\ 'DeleteMark': 'dm',
\ 'PurgeMarks': 'm<Space>',
\ 'PurgeMarkers': 'm<BS>',
\ 'GotoNextLineAlpha': "']",
\ 'GotoPrevLineAlpha': "'[",
\ 'GotoNextSpotAlpha': '`]',
\ 'GotoPrevSpotAlpha': '`[',
\ 'GotoNextLineByPos': "]'",
\ 'GotoPrevLineByPos': "['",
\ 'GotoNextSpotByPos': 'mn',
\ 'GotoPrevSpotByPos': 'mp',
\ 'GotoNextMarker': ']-',
\ 'GotoPrevMarker': '[-',
\ 'GotoNextMarkerAny': 'mj',
\ 'GotoPrevMarkerAny': 'mk',
\ }
endif
if dein#tap('auto-git-diff')
autocmd user_events FileType gitrebase
\ nmap <buffer><CR> <Plug>(auto_git_diff_scroll_manual_update)
\| nmap <buffer><C-n> <Plug>(auto_git_diff_scroll_down_page)
\| nmap <buffer><C-p> <Plug>(auto_git_diff_scroll_up_page)
\| nmap <buffer><C-d> <Plug>(auto_git_diff_scroll_down_half)
\| nmap <buffer><C-u> <Plug>(auto_git_diff_scroll_up_half)
endif
if dein#tap('committia.vim')
let g:committia_hooks = {}
function! g:committia_hooks.edit_open(info)
imap <buffer><C-d> <Plug>(committia-scroll-diff-down-half)
imap <buffer><C-u> <Plug>(committia-scroll-diff-up-half)
setlocal winminheight=1 winheight=1
resize 10
startinsert
endfunction
endif
if dein#tap('python_match.vim')
nmap <buffer> {{ [%
nmap <buffer> }} ]%
endif
if dein#tap('goyo.vim')
nnoremap <Leader>G :Goyo<CR>
endif
if dein#tap('vimwiki')
nnoremap <silent> <Leader>W :<C-u>VimwikiIndex<CR>
endif
if dein#tap('vim-choosewin')
nmap - <Plug>(choosewin)
nmap <Leader>- :<C-u>ChooseWinSwapStay<CR>
endif
if dein#tap('jedi-vim')
let g:jedi#completions_command = ''
let g:jedi#goto_command = '<C-]>'
let g:jedi#goto_assignments_command = 'gy'
let g:jedi#documentation_command = 'K'
let g:jedi#usages_command = 'gr'
let g:jedi#rename_command = '<Leader>R'
endif
if dein#tap('tern_for_vim')
autocmd user_events FileType javascript,jsx,javascript.jsx
\ nnoremap <silent><buffer> K :<C-u>TernDoc<CR>
\| nnoremap <silent><buffer> <C-]> :<C-u>TernDefSplit<CR>
\| nnoremap <silent><buffer> gy :<C-u>TernType<CR>
\| nnoremap <silent><buffer> gr :<C-u>TernRefs<CR>
\| nnoremap <silent><buffer> <leader>R :<C-u>TernRename<CR>
endif
if dein#tap('vim-gitgutter')
nmap ]g <Plug>(GitGutterNextHunk)
nmap [g <Plug>(GitGutterPrevHunk)
nmap gS <Plug>(GitGutterStageHunk)
xmap gS <Plug>(GitGutterStageHunk)
nmap <Leader>gr <Plug>(GitGutterUndoHunk)
nmap gs <Plug>(GitGutterPreviewHunk)
endif
if dein#tap('vim-go')
autocmd user_events FileType go
\ nmap <C-]> <Plug>(go-def)
\ | nmap <Leader>god <Plug>(go-describe)
\ | nmap <Leader>goc <Plug>(go-callees)
\ | nmap <Leader>goC <Plug>(go-callers)
\ | nmap <Leader>goi <Plug>(go-info)
\ | nmap <Leader>gom <Plug>(go-implements)
\ | nmap <Leader>gos <Plug>(go-callstack)
\ | nmap <Leader>goe <Plug>(go-referrers)
\ | nmap <Leader>gor <Plug>(go-run)
\ | nmap <Leader>gov <Plug>(go-vet)
endif
if dein#tap('phpcomplete-extended')
autocmd user_events FileType php
\ nmap <silent> <unique> K <Plug>(phpcomplete-extended-doc)
\ | nmap <silent> <unique> <C-]> <Plug>(phpcomplete-extended-goto)
\ | nmap <silent> <unique> <Leader>a <Plug>(phpcomplete-extended-add-use)
endif
if dein#tap('vimagit')
nnoremap <silent> mg :Magit<CR>
endif
if dein#tap('vim-easygit')
nnoremap <silent> <leader>gd :Gdiff<CR>
nnoremap <silent> <leader>gD :Gdiffoff<CR>
nnoremap <silent> <leader>gc :Gcommit<CR>
nnoremap <silent> <leader>gb :Gblame<CR>
nnoremap <silent> <leader>gB :Gbrowse<CR>
nnoremap <silent> <leader>gS :Gstatus<CR>
nnoremap <silent> <leader>gp :Gpush<CR>
endif
if dein#tap('vim-altr')
nmap <leader>n <Plug>(altr-forward)
nmap <leader>N <Plug>(altr-back)
endif
if dein#tap('open-browser.vim')
nmap gx <Plug>(openbrowser-smart-search)
vmap gx <Plug>(openbrowser-smart-search)
endif
if dein#tap('undotree')
nnoremap <Leader>gu :UndotreeToggle<CR>
endif
if dein#tap('thesaurus_query.vim')
nnoremap <silent> <Leader>K :<C-u>ThesaurusQueryReplaceCurrentWord<CR>
endif
if dein#tap('vim-asterisk')
map * <Plug>(asterisk-g*)
map g* <Plug>(asterisk-*)
map # <Plug>(asterisk-g#)
map g# <Plug>(asterisk-#)
map z* <Plug>(asterisk-z*)
map gz* <Plug>(asterisk-gz*)
map z# <Plug>(asterisk-z#)
map gz# <Plug>(asterisk-gz#)
endif
if dein#tap('vim-expand-region')
xmap v <Plug>(expand_region_expand)
xmap V <Plug>(expand_region_shrink)
endif
if dein#tap('sideways.vim')
nnoremap <silent> <, :SidewaysLeft<CR>
nnoremap <silent> >, :SidewaysRight<CR>
nnoremap <silent> [, :SidewaysJumpLeft<CR>
nnoremap <silent> ], :SidewaysJumpRight<CR>
omap <silent> a, <Plug>SidewaysArgumentTextobjA
xmap <silent> a, <Plug>SidewaysArgumentTextobjA
omap <silent> i, <Plug>SidewaysArgumentTextobjI
xmap <silent> i, <Plug>SidewaysArgumentTextobjI
endif
if dein#tap('splitjoin.vim')
let g:splitjoin_join_mapping = ''
let g:splitjoin_split_mapping = ''
nmap sj :SplitjoinJoin<CR>
nmap sk :SplitjoinSplit<CR>
endif
if dein#tap('linediff.vim')
vnoremap mdf :Linediff<CR>
vnoremap mda :LinediffAdd<CR>
nnoremap mds :<C-u>LinediffShow<CR>
nnoremap mdr :<C-u>LinediffReset<CR>
endif
if dein#tap('dsf.vim')
nmap dsf <Plug>DsfDelete
nmap csf <Plug>DsfChange
endif
if dein#tap('caw.vim')
function! InitCaw() abort
if ! &l:modifiable
silent! nunmap <buffer> <Leader>V
silent! xunmap <buffer> <Leader>V
silent! nunmap <buffer> <Leader>v
silent! xunmap <buffer> <Leader>v
silent! nunmap <buffer> gc
silent! xunmap <buffer> gc
silent! nunmap <buffer> gcc
silent! xunmap <buffer> gcc
else
xmap <buffer> <Leader>V <Plug>(caw:wrap:toggle)
nmap <buffer> <Leader>V <Plug>(caw:wrap:toggle)
xmap <buffer> <Leader>v <Plug>(caw:hatpos:toggle)
nmap <buffer> <Leader>v <Plug>(caw:hatpos:toggle)
nmap <buffer> gc <Plug>(caw:prefix)
xmap <buffer> gc <Plug>(caw:prefix)
nmap <buffer> gcc <Plug>(caw:hatpos:toggle)
xmap <buffer> gcc <Plug>(caw:hatpos:toggle)
endif
endfunction
autocmd user_events FileType * call InitCaw()
call InitCaw()
endif
if dein#tap('vim-textobj-multiblock')
omap <silent> ab <Plug>(textobj-multiblock-a)
omap <silent> ib <Plug>(textobj-multiblock-i)
xmap <silent> ab <Plug>(textobj-multiblock-a)
xmap <silent> ib <Plug>(textobj-multiblock-i)
endif
if dein#tap('vim-textobj-function')
omap <silent> af <Plug>(textobj-function-a)
omap <silent> if <Plug>(textobj-function-i)
xmap <silent> af <Plug>(textobj-function-a)
xmap <silent> if <Plug>(textobj-function-i)
endif
" vim: set ts=2 sw=2 tw=80 noet :