I'm working on a server, that I can only SSH into via a browser. In there, I have to edit some files.
The problem is, that let's say I go to INSERT MODE and write some text. If I then want to go back to NORMAL MODE, then I would normally just press ESC. HOWEVER! When I do so, then the browser 'catches' the ESC-press and the SSH-session will become out-of-focus, and it'll stay in INSERT MODE.
So how do I go from INSERT MODE without the escape-key?
Solution attempt 1 - -- (insert) --
If I press CTRL o - then I can insert one command, before 'coming back' to insert mode. I could write :wq
and then reopen the file afterwards. But I need to inject one big change at once, to several small ones (since it would leave the server in an error state).
Solution attempt 2 - Other browser
Try a different browser, didn't make any difference.
Solution attempt 3 - :set visualmode
I didn't find this anywhere - I'm simply grasping for straws. That command doesn't exist.
Solution attempt 4 - Read this: Avoid the escape key
I read that once, but apparently too quickly. I found the answer there later.
Specs
- The SSH-connection is to a server on AWS.
- I'm on a Macbook Pro (Big Sur).
- VIM-version 8.0 (2016, Sep 12)
- Fedora-Linux system.
<C-[>
work?