mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 22:40:06 +08:00
Fix #196
This commit is contained in:
parent
542715db74
commit
b946f46f51
@ -6,6 +6,7 @@ function! SpaceVim#layers#tools#plugins() abort
|
|||||||
\ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo', 'loadconf' : 1}],
|
\ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo', 'loadconf' : 1}],
|
||||||
\ ['junegunn/limelight.vim', { 'on_cmd' : 'Limelight'}],
|
\ ['junegunn/limelight.vim', { 'on_cmd' : 'Limelight'}],
|
||||||
\ ['Yggdroot/LeaderF', {'merged' : 0}],
|
\ ['Yggdroot/LeaderF', {'merged' : 0}],
|
||||||
|
\ ['MattesGroeger/vim-bookmarks', { 'on_map' : '<Plug>Bookmark', 'loadconf_before' : 1}],
|
||||||
\ ['google/vim-searchindex'],
|
\ ['google/vim-searchindex'],
|
||||||
\ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}],
|
\ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}],
|
||||||
\ ['wsdjeg/MarkDown.pl', { 'on_cmd' : 'MarkDownPreview'}],
|
\ ['wsdjeg/MarkDown.pl', { 'on_cmd' : 'MarkDownPreview'}],
|
||||||
@ -34,6 +35,11 @@ function! SpaceVim#layers#tools#plugins() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SpaceVim#layers#tools#config() abort
|
function! SpaceVim#layers#tools#config() abort
|
||||||
|
nmap mm <Plug>BookmarkToggle
|
||||||
|
nmap mi <Plug>BookmarkAnnotate
|
||||||
|
nmap ma <Plug>BookmarkShowAll
|
||||||
|
nmap mn <Plug>BookmarkNext
|
||||||
|
nmap mp <Plug>BookmarkPrev
|
||||||
nnoremap <silent> <F7> :MundoToggle<CR>
|
nnoremap <silent> <F7> :MundoToggle<CR>
|
||||||
augroup rainbow_lisp
|
augroup rainbow_lisp
|
||||||
autocmd!
|
autocmd!
|
||||||
|
@ -11,7 +11,6 @@ function! SpaceVim#plugins#load() abort
|
|||||||
endfunction
|
endfunction
|
||||||
function! s:load_plugins() abort
|
function! s:load_plugins() abort
|
||||||
for group in g:spacevim_plugin_groups
|
for group in g:spacevim_plugin_groups
|
||||||
let g:spacevim_plugin_layer = group
|
|
||||||
for plugin in s:getLayerPlugins(group)
|
for plugin in s:getLayerPlugins(group)
|
||||||
if len(plugin) == 2
|
if len(plugin) == 2
|
||||||
call zvim#plug#add(plugin[0], plugin[1])
|
call zvim#plug#add(plugin[0], plugin[1])
|
||||||
@ -27,9 +26,6 @@ function! s:load_plugins() abort
|
|||||||
endfor
|
endfor
|
||||||
call s:loadLayerConfig(group)
|
call s:loadLayerConfig(group)
|
||||||
endfor
|
endfor
|
||||||
if exists('g:spacevim_plugin_layer')
|
|
||||||
unlet g:spacevim_plugin_layer
|
|
||||||
endif
|
|
||||||
for plugin in g:spacevim_custom_plugins
|
for plugin in g:spacevim_custom_plugins
|
||||||
if len(plugin) == 2
|
if len(plugin) == 2
|
||||||
call zvim#plug#add(plugin[0], plugin[1])
|
call zvim#plug#add(plugin[0], plugin[1])
|
||||||
|
@ -150,20 +150,24 @@ fu! s:parser(args)
|
|||||||
endf
|
endf
|
||||||
|
|
||||||
function! zvim#plug#add(repo,...) abort
|
function! zvim#plug#add(repo,...) abort
|
||||||
|
let g:spacevim_plugin_name = ''
|
||||||
if g:spacevim_plugin_manager == 'neobundle'
|
if g:spacevim_plugin_manager == 'neobundle'
|
||||||
exec 'NeoBundle "'.a:repo.'"'.','.join(a:000,',')
|
exec 'NeoBundle "'.a:repo.'"'.','.join(a:000,',')
|
||||||
|
let g:spacevim_plugin_name = split(a:repo, '/')[-1]
|
||||||
elseif g:spacevim_plugin_manager == 'dein'
|
elseif g:spacevim_plugin_manager == 'dein'
|
||||||
if len(a:000) > 0
|
if len(a:000) > 0
|
||||||
call dein#add(a:repo,s:parser(a:000[0]))
|
call dein#add(a:repo,s:parser(a:000[0]))
|
||||||
else
|
else
|
||||||
call dein#add(a:repo)
|
call dein#add(a:repo)
|
||||||
endif
|
endif
|
||||||
|
let g:spacevim_plugin_name = g:dein#name
|
||||||
elseif g:spacevim_plugin_manager == 'vim-plug'
|
elseif g:spacevim_plugin_manager == 'vim-plug'
|
||||||
if len(a:000) > 0
|
if len(a:000) > 0
|
||||||
exec "Plug '".a:repo."', ".join(a:000,',')
|
exec "Plug '".a:repo."', ".join(a:000,',')
|
||||||
else
|
else
|
||||||
exec "Plug '".a:repo."'"
|
exec "Plug '".a:repo."'"
|
||||||
endif
|
endif
|
||||||
|
let g:spacevim_plugin_name = split(a:repo, '/')[-1]
|
||||||
endif
|
endif
|
||||||
let str = get(g:,'spacevim_plugin_layer', 'custom plugin')
|
let str = get(g:,'spacevim_plugin_layer', 'custom plugin')
|
||||||
let str = '[' . str . ']'
|
let str = '[' . str . ']'
|
||||||
|
9
config/plugins_before/vim-bookmarks.vim
Normal file
9
config/plugins_before/vim-bookmarks.vim
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
nmap <Leader><Leader> <Plug>BookmarkToggle
|
||||||
|
nmap <Leader>i <Plug>BookmarkAnnotate
|
||||||
|
nmap <Leader>a <Plug>BookmarkShowAll
|
||||||
|
nmap <Leader>j <Plug>BookmarkNext
|
||||||
|
nmap <Leader>k <Plug>BookmarkPrev
|
||||||
|
nmap <Leader>c <Plug>BookmarkClear
|
||||||
|
nmap <Leader>x <Plug>BookmarkClearAll
|
||||||
|
nmap <Leader>kk <Plug>BookmarkMoveUp
|
||||||
|
nmap <Leader>jj <Plug>BookmarkMoveDown
|
Loading…
Reference in New Issue
Block a user