Updated extra (markdown)

Junegunn Choi 2017-10-17 13:14:55 +09:00
parent 60badbf26a
commit 044c60b15b

@ -51,6 +51,29 @@ augroup PlugGx
augroup END
```
### Browse help files and README.md
Requires [fzf](https://github.com/junegunn/fzf).
```vim
function! s:plug_help_sink(line)
let dir = g:plugs[a:line].dir
for pat in ['doc/*.txt', 'README.md']
let match = get(split(globpath(dir, pat), "\n"), 0, '')
if len(match)
execute 'tabedit' match
return
endif
endfor
tabnew
execute 'Explore' dir
endfunction
command! PlugHelp call fzf#run(fzf#wrap({
\ 'source': sort(keys(g:plugs)),
\ 'sink': function('s:plug_help_sink')}))
```
### Extra key bindings for PlugDiff
(suggested by @sodapopcan)