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

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 acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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