aboutsummaryrefslogtreecommitdiff
path: root/plugins.vim
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2024-12-13 22:47:01 +0000
committerJuan J. Martinez <jjm@usebox.net>2024-12-13 22:47:01 +0000
commitc2916cfa82d7c865cc0190c68bc103d4d595a01e (patch)
treeb4830e232ad9dc4a24593528e6c6b1e27ac4af69 /plugins.vim
parent3958e7e3d9aaacb7e77cbb6eb522dbeaf1a33ad9 (diff)
downloaddotnvim-c2916cfa82d7c865cc0190c68bc103d4d595a01e.tar.gz
dotnvim-c2916cfa82d7c865cc0190c68bc103d4d595a01e.zip
Handy shortcutHEADmaster
Diffstat (limited to 'plugins.vim')
-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