Is there a way to clear the shell screen everytime before running a terminal command within vim?
This would be most useful to me when running scripts while editing it as I have a binding for Python scripts (for now; looking for a general solution though).
Currently I resort to
:!clear && !<command> however I would like this to be automatic.
How can I do this. Maybe remap
!clear && !?
So it turned out that I already had a solution in my vimrc for my specific case of running python scripts. I already had a
!clear as part of the autocmd.
However, the question remains open for a general solution in which the screen is cleared before every terminal command executed particularly basic utilities like
ls which I prefer to execute in the terminal as I have color highlighting which is not present in vims' version.