Replies: 2 comments 2 replies
-
There's not an event for that, but you could probably use a regular autocmd on something like |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Most of the time, I want to use neogit as if it was a standalone command-line TUI tool and not a vim plugin. Fire it up with
ng
, close it with aq
.I can start it fine with an alias to
nvim '+lua require("neogit").open({kind="replace"})'
, but the experience of quitting it is suboptimal: I pressq
, stare at a blank buffer in surprise and reach out for a:q<CR>
to actually quit.I suspected that the buffer that's annoying me is an empty buffer that you get when you execute
nvim
standaline, so I attempted closing it withnvim '+lua require("neogit").open({kind="replace"})' '+bdelete 1'
. It no longer shows up in:buffers
, but when Iq
, here it is again, annoying me. Same with+bwipeout 1
.How can I execute neogit in a way that
q
will make it quit neovim entirely if there was no other buffer open?I've seen that in a similar case the advice was to hook into events in order to implement autoclosing, but I don't see a closing event to hook into.
Beta Was this translation helpful? Give feedback.
All reactions