I am aware of Ctrl+L on bash terminal (using it on Ubuntu) which clears the screen by applying appropriate scrolling on bash terminal.
After learning that the terminal is by default set to emacs mode and that I have been using vim on the rest of my programming life, I wanted to shift to vi editing mode on terminal by using: set -o vi.
But it seems there is a learning curve here too. Here is my simple question:
How to clear the terminal in
vimode?
On a parallel note, am I right if I assume that every (at least the most used) command in emacs mode has equivalents in vi mode?
Clarification of similarity:
There seems to be a similar question -- Is there any way to enable Ctrl+L to clear screen when 'set -o vi' is set?
Which asks to force Ctrl+l as well to work in vi mode.
But clearly, it doesn't clarify whether is an existing/default way of clear-screen operation, in vi mode!! So, I reckon its a different question.
P.S. : Update:
As @Gilles pointed out, the Ctrl+L seem to work in command mode of vi style editing. That means we have two possible ways to clear the screen of a terminal in vi mode:
From the default insert-mode, we should press
Escto move to command-mode and then useCtrl+L.Use the answers in Is there any way to enable Ctrl+L to clear screen when 'set -o vi' is set? to get Ctrl+L working directly in insert-mode
My current question requests to explain any method other than the two, possibly native to insert-mode.