mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-24 09:21:32 +08:00
23 lines
731 B
VimL
23 lines
731 B
VimL
"=============================================================================
|
|
" helpgrep.vim --- asynchronous helpgrep
|
|
" Copyright (c) 2016-2023 Wang Shidong & Contributors
|
|
" Author: Wang Shidong < wsdjeg@outlook.com >
|
|
" URL: https://spacevim.org
|
|
" License: GPLv3
|
|
"=============================================================================
|
|
|
|
function! s:generate() abort
|
|
return filter(split(&rtp, ','), 'isdirectory(v:val)')
|
|
endfunction
|
|
|
|
function! s:help_files() abort
|
|
return globpath(&rtp, 'doc/*.txt', 0, 1)
|
|
endfunction
|
|
|
|
function! SpaceVim#plugins#helpgrep#help(...) abort
|
|
call SpaceVim#plugins#flygrep#open({
|
|
\ 'input' : get(a:000, 0, ''),
|
|
\ 'files' : s:help_files(),
|
|
\ })
|
|
endfunction
|