diff options
author | Abouzar Parvan <[email protected]> | 2021-07-07 22:21:23 +0430 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-07 13:51:23 -0400 |
commit | 51c0f489703b7db217c7ff12a1653ddc1abfcb8e (patch) | |
tree | 74336e0a414ffc322ebacfbe95d0b38593783da2 /lua/lv-floatterm/init.lua | |
parent | 5e2a0df7ef8752b2af38a670fdf89ef48e4daa0f (diff) |
while using lazygit inside fterm, esc key will act as quit instead of going to normal mode (#762)
Diffstat (limited to 'lua/lv-floatterm/init.lua')
-rw-r--r-- | lua/lv-floatterm/init.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lua/lv-floatterm/init.lua b/lua/lv-floatterm/init.lua index dee11540..31f06f8e 100644 --- a/lua/lv-floatterm/init.lua +++ b/lua/lv-floatterm/init.lua @@ -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 |