-
-
Notifications
You must be signed in to change notification settings - Fork 136
Expand file tree
/
Copy pathdispatch.vim
More file actions
51 lines (41 loc) · 1.66 KB
/
dispatch.vim
File metadata and controls
51 lines (41 loc) · 1.66 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
" Location: plugin/dispatch.vim
" Maintainer: Tim Pope <http://tpo.pe/>
" Version: 1.4
" GetLatestVimScripts: 4504 1 :AutoInstall: dispatch.vim
if exists("g:loaded_dispatch") || v:version < 700 || &cp
finish
endif
let g:loaded_dispatch = 1
command! -bang -nargs=* -range=0 -complete=customlist,dispatch#command_complete Dispatch
\ execute dispatch#compile_command(<bang>0, <q-args>,
\ <line1> && !<count> ? -1 : <line1> == <line2> ? <count> : 0)
command! -bang -nargs=* -range=0 -complete=customlist,dispatch#command_complete FocusDispatch
\ execute dispatch#focus_command(<bang>0, <q-args>,
\ <line1> && !<count> ? -1 : <line1> == <line2> ? <count> : 0)
command! -bang -nargs=* -complete=customlist,dispatch#make_complete Make
\ Dispatch<bang> _ <args>
command! -bang -nargs=* -complete=customlist,dispatch#command_complete Spawn
\ execute dispatch#spawn_command(<bang>0, <q-args>)
command! -bang -nargs=* -complete=customlist,dispatch#command_complete Start
\ execute dispatch#start_command(<bang>0, <q-args>)
command! -bang -count -bar Copen call dispatch#copen(<bang>0, <count>)
function! DispatchComplete(id) abort
return dispatch#complete(a:id)
endfunction
if !exists('g:dispatch_handlers')
let g:dispatch_handlers = [
\ 'tmux',
\ 'screen',
\ 'windows',
\ 'iterm',
\ 'x11',
\ 'headless',
\ ]
endif
augroup dispatch
autocmd!
autocmd FileType qf
\ if &buftype ==# 'quickfix' && empty(getloclist(winnr())) && get(w:, 'quickfix_title') =~# '^:noautocmd cgetfile\>\|^:\d*Dispatch\>' |
\ call dispatch#quickfix_init() |
\ endif
augroup END