:terminal feature is pretty neat, but when I run something like a rails server, I want to be able to clear logging output every now and then.
The usual methods in a non-vim term window don't seem to work, like
<D-k> (Cmd-k clears scrollback in Terminal.app on macOS), etc.
<C-w>:Clear<CR>, but it seems to be for something different as well.
If I weren't running a rails server, I could just type
clear in the terminal.
I glanced through
:help :term, and I'm not seeing what I want jump out at me.
<C-l>the standard clear key?
C-lactually does look like it clears the term window in Vim, but inconveniently it does not work when you have a process like rails server running. It has to be implemented by vim itself, because obviously if I use the terminal's actual clear key, it will wipe the whole screen including vim (which of course comes back if I hit
C-lto redraw). Perhaps this is just an edge case the new feature just hasn't addressed yet. Because it should be simple. You also can't
<C-\><C-n>and delete the text, because modifiable is off and cannot be turned on for a running process.
:termand then press
<C-l>in my spawned shell it clears the term screen
C-cto end. Or just do
sleep 10000and try to
C-lbefore it is done. This is actually the case for a non-vim terminal as well.