-
- Downloads
Expose IO functions as object
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', @%)
Please register or sign in to comment