mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-14 23:49:19 +08:00
commit
91973f35e1
@ -365,6 +365,7 @@ function! SpaceVim#default#SetMappings() abort
|
||||
call SpaceVim#mapping#def('nnoremap <silent>', '<Leader>sg', ':vsplit<CR>:wincmd p<CR>:e#<CR>',
|
||||
\'Open previous buffer in vsplit window' , 'vsplit|wincmd p|e#')
|
||||
call SpaceVim#mapping#def('nnoremap <silent>', 'gf', ':call zvim#gf()<CR>', 'Jump to a file under cursor', '')
|
||||
call SpaceVim#mapping#def('nnoremap <silent>', 'gd', ':call SpaceVim#mapping#gd()<CR>', 'Goto declaration', '')
|
||||
endfunction
|
||||
|
||||
fu! s:tobur(num) abort
|
||||
|
@ -22,7 +22,6 @@ function! SpaceVim#layers#autocomplete#plugins() abort
|
||||
\ ['honza/vim-snippets', {'on_i' : 1, 'loadconf_before' : 1}],
|
||||
\ ['Shougo/neco-syntax', { 'on_i' : 1}],
|
||||
\ ['ujihisa/neco-look', { 'on_i' : 1}],
|
||||
\ ['Shougo/neco-vim', { 'on_i' : 1, 'loadconf_before' : 1}],
|
||||
\ ['Shougo/context_filetype.vim', { 'on_i' : 1}],
|
||||
\ ['Shougo/neoinclude.vim', { 'on_i' : 1}],
|
||||
\ ['Shougo/neosnippet-snippets', { 'merged' : 0}],
|
||||
|
@ -19,4 +19,8 @@ function! SpaceVim#layers#git#config() abort
|
||||
nmap <leader>hk <plug>(signify-prev-hunk)
|
||||
nmap <leader>hJ 9999<leader>gj
|
||||
nmap <leader>hK 9999<leader>gk
|
||||
augroup spacevim_layer_git
|
||||
autocmd!
|
||||
autocmd FileType diff nnoremap <buffer><silent> q :bd!<CR>
|
||||
augroup END
|
||||
endfunction
|
||||
|
12
autoload/SpaceVim/layers/lang/vim.vim
Normal file
12
autoload/SpaceVim/layers/lang/vim.vim
Normal file
@ -0,0 +1,12 @@
|
||||
function! SpaceVim#layers#lang#vim#plugins() abort
|
||||
let plugins = []
|
||||
call add(plugins,['tweekmonster/exception.vim'])
|
||||
call add(plugins,['mhinz/vim-lookup'])
|
||||
call add(plugins,['Shougo/neco-vim', { 'on_i' : 1, 'loadconf_before' : 1}])
|
||||
call add(plugins,['tweekmonster/helpful.vim', {'on_cmd': 'HelpfulVersion'}])
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#lang#vim#config() abort
|
||||
call SpaceVim#mapping#gd#add('vim','lookup#lookup')
|
||||
endfunction
|
@ -6,7 +6,6 @@ function! SpaceVim#layers#tools#plugins() abort
|
||||
\ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo', 'loadconf' : 1}],
|
||||
\ ['Yggdroot/LeaderF', {'merged' : 0}],
|
||||
\ ['google/vim-searchindex'],
|
||||
\ ['tweekmonster/helpful.vim', {'on_cmd': 'HelpfulVersion'}],
|
||||
\ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}],
|
||||
\ ['wsdjeg/MarkDown.pl', { 'on_cmd' : 'MarkDownPreview'}],
|
||||
\ ['mhinz/vim-grepper' , { 'on_cmd' : 'Grepper', 'loadconf' : 1} ],
|
||||
|
@ -56,3 +56,11 @@ function! SpaceVim#mapping#enter() abort
|
||||
return "\<Enter>"
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#mapping#gd() abort
|
||||
if !empty(SpaceVim#mapping#gd#get())
|
||||
call call(SpaceVim#mapping#gd#get(), [])
|
||||
else
|
||||
normal! gd
|
||||
endif
|
||||
endfunction
|
||||
|
8
autoload/SpaceVim/mapping/gd.vim
Normal file
8
autoload/SpaceVim/mapping/gd.vim
Normal file
@ -0,0 +1,8 @@
|
||||
let s:gd = {}
|
||||
function! SpaceVim#mapping#gd#add(ft, func) abort
|
||||
call extend(s:gd,{a:ft : a:func})
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#mapping#gd#get() abort
|
||||
return get(s:gd, &filetype, '')
|
||||
endfunction
|
Loading…
x
Reference in New Issue
Block a user