comparison autoload/lawrencium/cat.vim @ 139:065625e1bb31

Split plugin file into multiple extensions.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 13 Jun 2016 09:32:34 -0700
parents
children
comparison
equal deleted inserted replaced
138:a2d823c82e5f 139:065625e1bb31
1
2 function! lawrencium#cat#init() abort
3 call lawrencium#add_reader('rev', 'lawrencium#cat#read')
4 endfunction
5
6 function! lawrencium#cat#read(repo, path_parts, full_path) abort
7 let l:rev = a:path_parts['value']
8 if l:rev == ''
9 call a:repo.ReadCommandOutput('cat', a:full_path)
10 else
11 call a:repo.ReadCommandOutput('cat', '-r', l:rev, a:full_path)
12 endif
13 endfunction
14