When quitting the terminal it always shows the [Process exited 2], how can I disable it so that when I quit the terminal buffer should just close silently?

1 Answer 1


You can use the autocmd TermClose

:au TermClose * :q

But this is generally not recommended since you will not be able the see the output and error. You can narrow the file pattern so that it only works for certain external commands that you don't care about the result.

Note that if you launch the terminal using :term, it will reuse the current window so that after finishing the current window will be closed. You may consider other alternatives like :b# instead of :q; or to launch the terminal in a split :new term://you-command


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.