1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 01:00:05 +08:00

Merge branch 'feature_request_487' into dev

This commit is contained in:
wsdjeg 2017-05-06 19:40:21 +08:00
commit d7deacefb4
4 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,7 @@ endfunction
function! SpaceVim#layers#checkers#config() abort function! SpaceVim#layers#checkers#config() abort
call SpaceVim#mapping#space#def('nnoremap', ['e', '.'], 'lopen', 'error-transient-state', 1) call SpaceVim#mapping#space#def('nnoremap', ['e', '.'], 'lopen', 'error-transient-state', 1)
call SpaceVim#mapping#space#def('nnoremap', ['e', 'n'], 'lnext', 'next-error', 1) call SpaceVim#mapping#space#def('nnoremap', ['e', 'n'], 'lnext', 'next-error', 1)
call SpaceVim#mapping#space#def('nnoremap', ['e', 'l'], 'lopen', 'toggle showing the error list', 1)
call SpaceVim#mapping#space#def('nnoremap', ['e', 'p'], 'lprevious', 'previous-error', 1) call SpaceVim#mapping#space#def('nnoremap', ['e', 'p'], 'lprevious', 'previous-error', 1)
call SpaceVim#mapping#space#def('nnoremap', ['e', 'N'], 'lNext', 'previous-error', 1) call SpaceVim#mapping#space#def('nnoremap', ['e', 'N'], 'lNext', 'previous-error', 1)
endfunction endfunction

View File

@ -10,4 +10,6 @@ function! SpaceVim#layers#core#config() abort
let g:rooter_silent_chdir = 1 let g:rooter_silent_chdir = 1
call SpaceVim#layers#load('core#banner') call SpaceVim#layers#load('core#banner')
call SpaceVim#mapping#space#def('nnoremap', ['p', 't'], 'Rooter', 'find-project-root', 1) call SpaceVim#mapping#space#def('nnoremap', ['p', 't'], 'Rooter', 'find-project-root', 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)
endfunction endfunction

View File

@ -9,7 +9,9 @@ function! SpaceVim#layers#default#plugins() abort
endfunction endfunction
function! SpaceVim#layers#default#config() abort function! SpaceVim#layers#default#config() abort
call SpaceVim#mapping#space#def('nnoremap', ['f', 'f'], "exe 'CtrlP ' . fnamemodify(bufname('%'), ':h')", 'Find files in the directory of the current buffer', 1)
call SpaceVim#mapping#space#def('nnoremap', ['f', 's'], 'write', 'save buffer', 1) call SpaceVim#mapping#space#def('nnoremap', ['f', 's'], 'write', 'save buffer', 1)
call SpaceVim#mapping#space#def('nnoremap', ['f', 'S'], 'wall', 'save all buffer', 1) call SpaceVim#mapping#space#def('nnoremap', ['f', 'S'], 'wall', 'save all buffer', 1)
call SpaceVim#mapping#space#def('nnoremap', ['f', 'W'], 'write !sudo tee % >/dev/null', 'save buffer with sudo', 1) call SpaceVim#mapping#space#def('nnoremap', ['f', 'W'], 'write !sudo tee % >/dev/null', 'save buffer with sudo', 1)
endfunction endfunction

View File

@ -50,6 +50,7 @@ function! SpaceVim#mapping#space#init() abort
nnoremap <silent> [SPC]tn :<C-u>setlocal nonumber! norelativenumber!<CR> nnoremap <silent> [SPC]tn :<C-u>setlocal nonumber! norelativenumber!<CR>
let g:_spacevim_mappings_space.t.n = ['setlocal nonumber! norelativenumber!', 'toggle line number'] let g:_spacevim_mappings_space.t.n = ['setlocal nonumber! norelativenumber!', 'toggle line number']
call SpaceVim#mapping#menu('toggle line number', '[SPC]tn', 'set nu!') call SpaceVim#mapping#menu('toggle line number', '[SPC]tn', 'set nu!')
call SpaceVim#mapping#space#def('nnoremap', ['b', 'b'], 'Unite buffer', 'buffer list', 1)
endfunction endfunction
function! SpaceVim#mapping#space#def(m, keys, cmd, desc, is_cmd) abort function! SpaceVim#mapping#space#def(m, keys, cmd, desc, is_cmd) abort