mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-24 21:16:51 -07:00
Updated extra (markdown)
parent
60badbf26a
commit
044c60b15b
23
extra.md
23
extra.md
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user