vim terminal

39 views
Skip to first unread message

Joseph Dornisch

unread,
Nov 8, 2019, 2:25:52 PM11/8/19
to vim...@googlegroups.com
I just started to use the :term command yesterday. Is there a simple way to clear the contents of the window (without closing it and opening a new terminal)? I'd like to be able to clear the contents, while remaining the command line history.

tooth pik

unread,
Nov 8, 2019, 3:51:50 PM11/8/19
to vim...@googlegroups.com
are you looking for the clear command? it's ... clear

On Fri, Nov 8, 2019 at 1:25 PM Joseph Dornisch <kingca...@gmail.com> wrote:
>
> I just started to use the :term command yesterday. Is there a simple way to clear the contents of the window (without closing it and opening a new terminal)? I'd like to be able to clear the contents, while remaining the command line history.
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAFim3NJZPnRU6ZYhr4EfhpuebG97qa_%2Bxsgqno3wmWyLr6Dznw%40mail.gmail.com.

Joseph Dornisch

unread,
Nov 8, 2019, 5:06:32 PM11/8/19
to vim...@googlegroups.com
clear will work for a terminal that makes use of it (which I guess is most terminals), but I am working on Windows, and clear does nothing.
I tried 'cls', which seems to work fine from a dos window, but in vim, it just resets the screen, but I can still scroll through the console history.
Basically, I want to easily be able to reset the current prompt to line 1, so I can compile (or whatever), and then go back to the beginning of the console window without finding this spot in the history.
e.g.
prompt> clear (or some vim command)
prompt> ant clean all
lots of error messages
prompt> <C-\>Ngg
...
This might work fine in Linux with clear, but I don't really get the behavior I want in Windows with clr. I suppose I could set a mark and then jump to the mark.

Reply all
Reply to author
Forward
0 new messages