add some mouse stuff to the terminal mode

master
Jordan Orelli 2 years ago
parent 7866c961fb
commit bb44de2aca

@ -397,8 +397,25 @@ let g:terminal_ansi_colors = [
\ '#ffffff' \ '#ffffff'
\ ] \ ]
autocmd TerminalOpen * set nonu
highlight Terminal guibg='#0c0c0c' highlight Terminal guibg='#0c0c0c'
highlight Terminal guifg='#cccccc' highlight Terminal guifg='#cccccc'
function! ExitNormalMode()
unmap <buffer> <silent> <RightMouse>
call feedkeys("a")
endfunction
function! EnterNormalMode()
if &buftype == 'terminal' && mode('') == 't'
call feedkeys("\<c-w>N")
call feedkeys("\<c-y>")
map <buffer> <silent> <RightMouse> :call ExitNormalMode()<CR>
endif
endfunction
tmap <silent> <ScrollWheelUp> <c-w>:call EnterNormalMode()<CR>
" ---------------------------------------------------------------------------}}} " ---------------------------------------------------------------------------}}}
" Operator-Pending Mode -----------------------------------------------------{{{ " Operator-Pending Mode -----------------------------------------------------{{{

Loading…
Cancel
Save