mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 04:53:45 -05:00
This is a new interface to a slightly older API for performing standard
VimL IO functions against URLs (or any other URLs, the interface is
generic). Example wrapper function:
function! IO(fn, ...) abort
let file = a:fn ==# 'writefile' ? a:2 : a:1
let obj = get(g:, 'io_' . matchstr(file, '^\a\a\+'), {})
return call(get(obj, a:fn, a:fn), a:000)
endfunction
echo IO('filereadable', @%)