aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins.vim11
1 files changed, 11 insertions, 0 deletions
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()<CR>
+
source ~/.config/nvim/lualine.lua
" for LSP config