1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 22:10:06 +08:00

Add vim calendar

This commit is contained in:
wsdjeg 2017-04-17 21:41:06 +08:00
parent a381ad8cc2
commit bec852e1e0
2 changed files with 6 additions and 1 deletions

View File

@ -46,6 +46,7 @@ function! SpaceVim#layers#tools#plugins() abort
endfunction
function! SpaceVim#layers#tools#config() abort
call SpaceVim#mapping#space#def('nnoremap', ['a', 'c'], 'Calendar', 'vim calendar', 1)
nmap mm <Plug>BookmarkToggle
nmap mi <Plug>BookmarkAnnotate
nmap ma <Plug>BookmarkShowAll

View File

@ -3,6 +3,10 @@ function! SpaceVim#mapping#space#init() abort
nmap <Space> [SPC]
let g:_spacevim_mappings_space = {}
let g:_spacevim_mappings_space.t = {'name' : '+Toggle editor visuals'}
let g:_spacevim_mappings_space.a = {'name' : '+Applications'}
let g:_spacevim_mappings_space.b = {'name' : '+Buffers'}
let g:_spacevim_mappings_space.e = {'name' : '+Errors'}
let g:_spacevim_mappings_space.B = {'name' : '+Global-uffers'}
nnoremap <silent> [SPC]tn :<C-u>set nu!<CR>
let g:_spacevim_mappings_space.t.n = ['set nu!', 'toggle line number']
endfunction
@ -20,7 +24,7 @@ function! SpaceVim#mapping#space#def(m, keys, cmd, desc, is_cmd) abort
let lcmd = 'call feedkeys("' . a:cmd . '", "' . feedkey_m . '")'
endif
endif
exe a:m . ' <silent> [SPC]' . join(a:keys) . ' ' . cmd
exe a:m . ' <silent> [SPC]' . join(a:keys, '') . ' ' . cmd
if len(a:keys) == 2
let g:_spacevim_mappings_space[a:keys[0]][a:keys[1]] = [lcmd, a:desc]
elseif len(a:keys) == 1