1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 07:20:04 +08:00

fix(flygrep): fix flygrep test

This commit is contained in:
wsdjeg 2023-06-27 02:03:40 +08:00
parent 138a8e150a
commit fe3b7f91cc
4 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,8 @@
vim.api.nvim_create_user_command('Nvim', function(opt)
local cmd = { 'nvim-qt', '--' }
for _, v in pairs(opt.fargs) do
table.insert(cmd, v)
end
vim.fn.jobstart(cmd)
end, { nargs = '*', complete = 'file' })

8
bundle/FlyGrep/autoload/flygrep.vim vendored Normal file
View File

@ -0,0 +1,8 @@
function! flygrep#open(argv) abort
call SpaceVim#plugins#flygrep#open(a:argv)
endfunction
function! flygrep#statusline() abort
let st = ' FlyGrep %{getcwd()} '
return st . "%{getline(1) ==# '' ? '' : (line('.') . '/' . line('$'))}"
endfunction

View File

@ -39,5 +39,5 @@ let g:FlyGrep_enable_statusline = get(g:, 'FlyGrep_enable_statusline', 1)
" Set FlyGrep default command prompt
let g:spacevim_commandline_prompt = get(g:, 'spacevim_commandline_prompt', '➭')
command! -nargs=0 FlyGrep call FlyGrep#open({})
command! -nargs=0 FlyGrep call flygrep#open({})

4
bundle/FlyGrep/test/vimrc vendored Normal file
View File

@ -0,0 +1,4 @@
let s:path = expand('<sfile>:p:h:h')
call execute('set rtp+=' . s:path)
set rtp+=.