I have the vim-fugitive plugin and use
:G a lot. If I have NERDTree as a plug or netrw enabled then
:G will open either a NERDTree file or a netrw file instead of the usual fugitive file with the current git status. I even tried in neovim to have nvim-tree and vim-fugitive together, which works better but prints out an error message every time:
Error executing lua callback: vim/shared.lua:0: s: expected string, got nil stack traceback: [C]: in function 'error' vim/shared.lua: in function 'validate' vim/shared.lua: in function 'startswith' ...
After pressing away this error message, fugitive works as expected. It seems that any file explorer is overriding fugitive commands. Is there anyway to fix this? One workaround is to map
:silent! G, but it seems there are deeper issues here.
:verbose command G
! G ? . customlist,fugitive#Complete exe fugitive#Command(<line1>, <count>, +"<range>", <bang>0, "<mods>", <q-args>), i.e. it points to the correct function, but all
:Gshows is a buffer of nerdtree filetype showing fugitive directories.