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

Fix alt + left and alt + right mapping for terminal buffer

This commit is contained in:
wsdjeg 2017-01-26 22:06:21 +08:00
parent ccd1b14bae
commit ea77ad5a59
2 changed files with 3 additions and 1 deletions

View File

@ -178,6 +178,8 @@ function! SpaceVim#default#SetMappings() abort
exe 'tnoremap <silent><C-Left> <C-\><C-n>:<C-u>wincmd h<CR>' exe 'tnoremap <silent><C-Left> <C-\><C-n>:<C-u>wincmd h<CR>'
exe 'tnoremap <silent><C-Up> <C-\><C-n>:<C-u>wincmd k<CR>' exe 'tnoremap <silent><C-Up> <C-\><C-n>:<C-u>wincmd k<CR>'
exe 'tnoremap <silent><C-Down> <C-\><C-n>:<C-u>wincmd j<CR>' exe 'tnoremap <silent><C-Down> <C-\><C-n>:<C-u>wincmd j<CR>'
exe 'tnoremap <silent><M-Left> <C-\><C-n>:<C-u>bprev<CR>'
exe 'tnoremap <silent><M-Right> <C-\><C-n>:<C-u>bnext<CR>'
exe 'tnoremap <silent><esc> <C-\><C-n>' exe 'tnoremap <silent><esc> <C-\><C-n>'
endif endif

View File

@ -55,7 +55,7 @@ let g:terminal_color_15 = "#ebdbb2"
augroup Terminal augroup Terminal
au! au!
au TermOpen * let g:last_terminal_job_id = b:terminal_job_id | IndentLinesDisable au TermOpen * let g:last_terminal_job_id = b:terminal_job_id | IndentLinesDisable
au WinEnter term://* startinsert | IndentLinesDisable au BufWinEnter term://* startinsert | IndentLinesDisable
"au TermClose * exec &buftype == 'terminal' ? 'bd!' : '' "au TermClose * exec &buftype == 'terminal' ? 'bd!' : ''
au TermClose * exe expand('<abuf>').'bd!' au TermClose * exe expand('<abuf>').'bd!'
augroup END augroup END