mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-24 10:47:07 +08:00
parent
1eba32e9a9
commit
76aede0037
@ -270,6 +270,10 @@ let g:spacevim_enable_os_fileformat_icon = 0
|
|||||||
" <
|
" <
|
||||||
let g:spacevim_plugin_groups = []
|
let g:spacevim_plugin_groups = []
|
||||||
""
|
""
|
||||||
|
" Set the github username, It will be used for getting your starred repos, and
|
||||||
|
" fuzzy find the repo you want.
|
||||||
|
let g:spacevim_github_username = ''
|
||||||
|
""
|
||||||
" Disable plugins by name.
|
" Disable plugins by name.
|
||||||
" >
|
" >
|
||||||
" let g:spacevim_disabled_plugins = ['vim-foo', 'vim-bar']
|
" let g:spacevim_disabled_plugins = ['vim-foo', 'vim-bar']
|
||||||
|
@ -25,6 +25,10 @@ function! SpaceVim#logger#info(msg) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SpaceVim#logger#warn(msg) abort
|
function! SpaceVim#logger#warn(msg) abort
|
||||||
|
let msg = s:warpMsg(a:msg, 2)
|
||||||
|
echohl WarningMsg
|
||||||
|
echomsg msg
|
||||||
|
echohl NONE
|
||||||
if g:spacevim_enable_debug && s:logger_level <= 2
|
if g:spacevim_enable_debug && s:logger_level <= 2
|
||||||
call s:wite(s:warpMsg(a:msg, 2))
|
call s:wite(s:warpMsg(a:msg, 2))
|
||||||
else
|
else
|
||||||
|
@ -181,14 +181,19 @@ func! Show_Log_for_current_plugin()
|
|||||||
exe "nnoremap <buffer><CR> :call <SID>Opencommit('". plug ."', strpart(split(getline('.'),'[33m')[1],0,7))<CR>"
|
exe "nnoremap <buffer><CR> :call <SID>Opencommit('". plug ."', strpart(split(getline('.'),'[33m')[1],0,7))<CR>"
|
||||||
endf
|
endf
|
||||||
fu! s:Opencommit(repo,commit)
|
fu! s:Opencommit(repo,commit)
|
||||||
exe "OpenBrowser https://github.com/" . a:repo ."/commit/". a:commit
|
exe 'OpenBrowser https://github.com/' . a:repo .'/commit/'. a:commit
|
||||||
endf
|
endf
|
||||||
|
|
||||||
fu! UpdateStarredRepos()
|
fu! UpdateStarredRepos()
|
||||||
let repos = github#api#users#GetStarred('wsdjeg')
|
if empty(g:spacevim_github_username)
|
||||||
|
call SpaceVim#logger#warn('You need to set g:spacevim_github_username')
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
let repos = github#api#users#GetStarred(g:spacevim_github_username)
|
||||||
for repo in repos
|
for repo in repos
|
||||||
let description = repo.full_name . repeat(' ', 40 - len(repo.full_name)) . repo.description
|
let description = repo.full_name . repeat(' ', 40 - len(repo.full_name)) . repo.description
|
||||||
let cmd = "OpenBrowser " . repo.html_url
|
let cmd = 'OpenBrowser ' . repo.html_url
|
||||||
call add(g:unite_source_menu_menus.MyStarredrepos.command_candidates, [description,cmd])
|
call add(g:unite_source_menu_menus.MyStarredrepos.command_candidates, [description,cmd])
|
||||||
endfor
|
endfor
|
||||||
|
return 1
|
||||||
endf
|
endf
|
||||||
|
@ -283,9 +283,16 @@ nnoremap <silent><Leader>ta :<C-u>Unite -start-insert -buffer-name=tag tag<cr>
|
|||||||
nnoremap <silent><leader>ugg :Unite -silent -start-insert menu:git<CR>
|
nnoremap <silent><leader>ugg :Unite -silent -start-insert menu:git<CR>
|
||||||
nnoremap <silent><leader>ugf :UniteWithCursorWord file_rec/async<CR>
|
nnoremap <silent><leader>ugf :UniteWithCursorWord file_rec/async<CR>
|
||||||
nnoremap <silent><leader>ugt :UniteWithCursorWord tag<CR>
|
nnoremap <silent><leader>ugt :UniteWithCursorWord tag<CR>
|
||||||
nnoremap <silent><Leader>ls :Unite
|
nnoremap <silent><Leader>ls :call <SID>view_github_starred_repos()<CR>
|
||||||
\ -silent -ignorecase -winheight=17
|
function! s:view_github_starred_repos() abort
|
||||||
\ -start-insert menu:MyStarredrepos<CR>
|
if empty(g:unite_source_menu_menus.MyStarredrepos.command_candidates)
|
||||||
|
if UpdateStarredRepos()
|
||||||
|
Unite -silent -ignorecase -winheight=17 -start-insert menu:MyStarredrepos
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
Unite -silent -ignorecase -winheight=17 -start-insert menu:MyStarredrepos
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
nnoremap <silent><Leader>lm :Unite
|
nnoremap <silent><Leader>lm :Unite
|
||||||
\ -silent -ignorecase -winheight=17 -start-insert menu:MpvPlayer<CR>
|
\ -silent -ignorecase -winheight=17 -start-insert menu:MpvPlayer<CR>
|
||||||
call zvim#util#loadMusics()
|
call zvim#util#loadMusics()
|
||||||
|
@ -295,6 +295,10 @@ Plugin groups to be loaded.
|
|||||||
let g:spacevim_plugin_groups = ['core', 'lang']
|
let g:spacevim_plugin_groups = ['core', 'lang']
|
||||||
<
|
<
|
||||||
|
|
||||||
|
*g:spacevim_github_username*
|
||||||
|
Set the github username, It will be used for getting your starred repos, and
|
||||||
|
fuzzy find the repo you want.
|
||||||
|
|
||||||
*g:spacevim_disabled_plugins*
|
*g:spacevim_disabled_plugins*
|
||||||
Disable plugins by name.
|
Disable plugins by name.
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user