" Scrolling (shows history) in terminal (except in lazygit) " Scroll up to activate it, and press right mouse button to deactivate it " Slightly modified version of: https://github.com/vim/vim/issues/2490#issuecomment-393973253 tmap :call EnterNormalMode() function! ExitNormalMode() unmap call feedkeys("a") endfunction function! EnterNormalMode() if bufname('%') =~ '!lazygit' tunmap elseif &buftype == 'terminal' && mode('') == 't' call feedkeys("\N") call feedkeys("\") map :call ExitNormalMode() endif endfunction