Created
September 9, 2013 09:49
-
-
Save actionshrimp/6493611 to your computer and use it in GitHub Desktop.
A vim-fugitive status window toggle (mapped to F3). Seems to work nicely
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! ToggleGStatus() | |
if buflisted(bufname('.git/index')) | |
bd .git/index | |
else | |
Gstatus | |
endif | |
endfunction | |
command ToggleGStatus :call ToggleGStatus() | |
nmap <F3> :ToggleGStatus<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Fymyte Thanks for the lua snippet! (p.s. there is a typo, it should be
if vim.fn.buflisted(vim.fn.bufname('fugitive:///*/.git//$')) ~= 0 then
)