From bb44de2acabc54d3a45d158dc42c0f5862426791 Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Sat, 17 Dec 2022 16:26:25 -0600 Subject: [PATCH] add some mouse stuff to the terminal mode --- .vimrc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.vimrc b/.vimrc index 4516994..e2279b7 100644 --- a/.vimrc +++ b/.vimrc @@ -397,8 +397,25 @@ let g:terminal_ansi_colors = [ \ '#ffffff' \ ] +autocmd TerminalOpen * set nonu + highlight Terminal guibg='#0c0c0c' highlight Terminal guifg='#cccccc' + +function! ExitNormalMode() + unmap + call feedkeys("a") +endfunction + +function! EnterNormalMode() + if &buftype == 'terminal' && mode('') == 't' + call feedkeys("\N") + call feedkeys("\") + map :call ExitNormalMode() + endif +endfunction + +tmap :call EnterNormalMode() " ---------------------------------------------------------------------------}}} " Operator-Pending Mode -----------------------------------------------------{{{