1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-11 08:55:43 +08:00

Add quit mappings for spacevim

This commit is contained in:
wsdjeg 2017-10-04 14:31:01 +08:00
parent 63c7705a0b
commit c83c74830c
3 changed files with 8 additions and 2 deletions

View File

@ -15,4 +15,9 @@ function! SpaceVim#layers#core#config() abort
call SpaceVim#mapping#space#def('nnoremap', ['p', 'k'], 'call SpaceVim#plugins#projectmanager#kill_project()', 'kill all project buffers', 1)
call SpaceVim#mapping#space#def('nnoremap', ['p', 'f'], 'CtrlP', 'find files in current project', 1)
call SpaceVim#mapping#space#def('nnoremap', ['p', '/'], 'Grepper', 'fuzzy search for text in current project', 1)
call SpaceVim#mapping#space#def('nnoremap', ['q', 'q'], 'qa', 'prompt-kill-vim', 1)
call SpaceVim#mapping#space#def('nnoremap', ['q', 'Q'], 'qa!', 'kill-vim', 1)
call SpaceVim#mapping#space#def('nnoremap', ['q', 'R'], '', 'restart-vim(TODO)', 1)
call SpaceVim#mapping#space#def('nnoremap', ['q', 'r'], '', 'restart-vim-resume-layouts(TODO)', 1)
call SpaceVim#mapping#space#def('nnoremap', ['q', 't'], 'tabclose!', 'kill current tab', 1)
endfunction

View File

@ -101,7 +101,7 @@ function! SpaceVim#layers#core#tabline#get() abort
endif
endfor
let t .= '%=%#SpaceVim_tabline_a_SpaceVim_tabline_b#' . s:rsep
let t .= '%#SpaceVim_tabline_a# Tabs'
let t .= '%#SpaceVim_tabline_a# Tabs '
else
let s:buffers = s:BUFFER.listed_buffers()
let g:_spacevim_list_buffers = s:buffers
@ -146,7 +146,7 @@ function! SpaceVim#layers#core#tabline#get() abort
endif
endfor
let t .= '%=%#SpaceVim_tabline_a_SpaceVim_tabline_b#' . s:rsep
let t .= '%#SpaceVim_tabline_a# Buffers'
let t .= '%#SpaceVim_tabline_a# Buffers '
endif
return t
endfunction

View File

@ -16,6 +16,7 @@ function! SpaceVim#mapping#space#init() abort
let g:_spacevim_mappings_space.w = {'name' : '+Windows'}
let g:_spacevim_mappings_space.p = {'name' : '+Projects'}
let g:_spacevim_mappings_space.h = {'name' : '+Help'}
let g:_spacevim_mappings_space.q = {'name' : '+Quit'}
let g:_spacevim_mappings_space.l = {'name' : '+Language Specified'}
let g:_spacevim_mappings_space.s = {'name' : '+Searching'}
let g:_spacevim_mappings_space.r = {'name' : '+Registers/rings/resume'}