Skip to content

Instantly share code, notes, and snippets.

@irizwaririz
Last active June 3, 2022 09:31
Show Gist options
  • Save irizwaririz/ac38272bdd2859e28f8032535dc07f3e to your computer and use it in GitHub Desktop.
Save irizwaririz/ac38272bdd2859e28f8032535dc07f3e to your computer and use it in GitHub Desktop.
Toggle the vim-fugitive git status window
" Easily open/close (toggle) the git status window.
nnoremap <leader>gs :call ToggleGStatus()<CR>
function! ToggleGStatus()
if buflisted(bufname('.git/index'))
bd .git/index
else
G
endif
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment