I use ssh -X user@IP
to connect to an Ubuntu Server which has had gnome-terminal
installed on it.
When inside gnome-terminal
, occasionally I accidentally hit a key combination and the terminal behaves differently. I think I have entered "vi mode". As an example, after I have hit this mysterious combination, I can press - and the font size of the terminal gets smaller.
I have to press ESC to get back into the normal mode.
Can anyone tell me what key combination I may have hit, and provide links or useful hints for the things I might be able to do with "vi mode"?
I have tried searching Google but haven't found anything particularly good - most pages refer to "vi mode" inside vi.
For information, I am using a French AZERTY keyboard, and the key combination I think I hit is AltGr+- (on AZERTY keyboards the number keys provide punctuation unless Shift is pressed - the key I am pressing has the 6 on it), so that I can get the |
character.
Usually
vi
mode is set in bash withset -o vi
.By default, and contrary to the editor itself, you will be in
insert
mode. You can hit ESC and i to move between insert and command mode.(from linuxselfhelp )
To go to the default mode, use
set -o emacs
.According to this question , you can toggle out of emacs mode (and back) with Meta+Ctrl+J . But I can't get that to work on my keyboard (perhaps because I'm not sure what Meta is mapped to).
Here's a link with some editing commands : hyperex.org : vi mode .
Here's another link to a cheat-sheet type reference : catonmat.net .