Retab some files
This commit is contained in:
parent
50cc8ca0be
commit
01624e0c71
3 changed files with 15 additions and 15 deletions
|
@ -4,7 +4,7 @@ function! TryAutosave()
|
||||||
if &autowriteall
|
if &autowriteall
|
||||||
if &mod
|
if &mod
|
||||||
silent write
|
silent write
|
||||||
redraw
|
redraw
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
function Defer(command, callback)
|
function Defer(command, callback)
|
||||||
let l:buffer = []
|
let l:buffer = []
|
||||||
call job_start(a:command, {
|
call job_start(a:command, {
|
||||||
\ "out_io": "pipe",
|
\ "out_io": "pipe",
|
||||||
\ "out_cb": { pipe, text -> add(l:buffer, text) },
|
\ "out_cb": { pipe, text -> add(l:buffer, text) },
|
||||||
\ "close_cb": { pipe -> a:callback(l:buffer) }
|
\ "close_cb": { pipe -> a:callback(l:buffer) }
|
||||||
\ })
|
\ })
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
comm -complete=shellcmd -nargs=* Defer call Defer(<q-args>, { buffer -> 0 })
|
comm -complete=shellcmd -nargs=* Defer call Defer(<q-args>, { buffer -> 0 })
|
||||||
|
|
|
@ -24,14 +24,14 @@ augroup NETRW
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
function s:vex()
|
function s:vex()
|
||||||
let netrw_windows = getwininfo()
|
let netrw_windows = getwininfo()
|
||||||
\->filter({ k,v -> v["variables"]->has_key("netrw_treedict") })
|
\->filter({ k,v -> v["variables"]->has_key("netrw_treedict") })
|
||||||
\->filter({ k,v -> v["tabnr"]==tabpagenr() })
|
\->filter({ k,v -> v["tabnr"]==tabpagenr() })
|
||||||
if netrw_windows->len() > 0
|
if netrw_windows->len() > 0
|
||||||
call win_gotoid(netrw_windows[0]["winid"])
|
call win_gotoid(netrw_windows[0]["winid"])
|
||||||
else
|
else
|
||||||
Vex .
|
Vex .
|
||||||
end
|
end
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
nnoremap <leader><space> :call <SID>vex()<CR>
|
nnoremap <leader><space> :call <SID>vex()<CR>
|
||||||
|
|
Loading…
Reference in a new issue