From c2916cfa82d7c865cc0190c68bc103d4d595a01e Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Fri, 13 Dec 2024 22:47:01 +0000 Subject: Handy shortcut --- plugins.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'plugins.vim') diff --git a/plugins.vim b/plugins.vim index e122a46..e879a56 100644 --- a/plugins.vim +++ b/plugins.vim @@ -77,6 +77,17 @@ call plug#end() } EOF +function! ToggleGstatus() abort + for l:winnr in range(1, winnr('$')) + if !empty(getwinvar(l:winnr, 'fugitive_status')) + exe l:winnr 'close' + return + endif + endfor + keepalt Git +endfunction +nnoremap gs :call ToggleGstatus() + source ~/.config/nvim/lualine.lua " for LSP config -- cgit v1.2.3