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?
You can use the autocmd
: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