mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
while using lazygit inside fterm, esc key will act as quit instead of going to normal mode (#762)
This commit is contained in:
parent
5e2a0df7ef
commit
51c0f48970
2 changed files with 15 additions and 0 deletions
|
@ -40,6 +40,17 @@ M.config = function()
|
|||
end
|
||||
lazy:toggle()
|
||||
end
|
||||
|
||||
-- Map esc to exit inside lazygit
|
||||
vim.api.nvim_exec([[
|
||||
function LazyGitNativation()
|
||||
echom &filetype
|
||||
if &filetype ==# 'FTerm'
|
||||
tnoremap <Esc> q
|
||||
tnoremap <C-v><Esc> <Esc>
|
||||
endif
|
||||
endfunction
|
||||
]], false)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
@ -76,6 +76,10 @@ lv_utils.define_augroups {
|
|||
-- will cause split windows to be resized evenly if main window is resized
|
||||
{ "VimResized ", "*", "wincmd =" },
|
||||
},
|
||||
_fterm_lazygit = {
|
||||
-- will cause esc key to exit lazy git
|
||||
{"TermEnter", "*", "call LazyGitNativation()"}
|
||||
},
|
||||
-- _mode_switching = {
|
||||
-- -- will switch between absolute and relative line numbers depending on mode
|
||||
-- {'InsertEnter', '*', 'if &relativenumber | let g:ms_relativenumberoff = 1 | setlocal number norelativenumber | endif'},
|
||||
|
|
Loading…
Reference in a new issue