From edbcd138dc5d68762e7e4fe26a1b73534d4e75e6 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 8 Aug 2024 08:08:28 +0300 Subject: feat(vim): Final vimrc edits --- .vim/feat/term_scroll.vim | 10 +++++----- .vim/mappings.vim | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.vim/feat/term_scroll.vim b/.vim/feat/term_scroll.vim index d01fe4c..ef55017 100644 --- a/.vim/feat/term_scroll.vim +++ b/.vim/feat/term_scroll.vim @@ -1,19 +1,19 @@ " 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() +tmap :call EnterNormalMode() function! ExitNormalMode() - unmap + unmap call feedkeys("a") endfunction function! EnterNormalMode() - if @% == '!lazygit' - tunmap + if bufname('%') =~ '!lazygit' + tunmap elseif &buftype == 'terminal' && mode('') == 't' call feedkeys("\N") call feedkeys("\") - map :call ExitNormalMode() + map :call ExitNormalMode() endif endfunction diff --git a/.vim/mappings.vim b/.vim/mappings.vim index c620b69..b751272 100644 --- a/.vim/mappings.vim +++ b/.vim/mappings.vim @@ -27,7 +27,7 @@ let g:tabman_toggle = '' """ inoremap :w -inoremap "+p +inoremap "+P inoremap ggVG inoremap inoremap u -- cgit v1.2.3