Ask coding questions

← Back to all posts
Improve vim emulation so that "ESC" actually works
macintacos

Right now, there is a vim "mode" in the editor, which is great and all, but the single thing I would expect to work (pressing "ESC" to get out of Insert).... doesn't work. It seems to bubble up to the browser itself, which responds with the regular response when you're in an arbitrary text field in a browser page; it takes the cursor completely out of the editor (meaning your subsequent keystrokes are lost) instead of changing you to "NORMAL" mode.

Can this be fixed so that we can have at least semi-reliable vim emulation in the editor? Otherwise it's going to be difficult for me to use this for its intended purpose (i.e. actually coding in the browser). I don't really want to do any kind of text editing without vim keybindings if I can help it :)

Answered by replitjeremy [earned 5 cycles]
View Answer
Voters
TomLisankie
Themihas
Highwayman
macintacos
Comments
hotnewtop
replitjeremy

hey, @macintacos, I'm able to get out of INSERT mode with "esc", can you link to the repl where this doesn't work? What kind of file are you trying to edit, and what browser are you using?

macintacos

@replitjeremy hm.... I was just about to conjure an example, but it seems to work now. I'm using Chrome, but I don't really have anything else to go by at this point since I can't reproduce. I'll close this out then.

macintacos

I can't seem to close this, and it's forcing me to pick an "answer" so I'll just go with yours. Thanks Jeremy :)

ChrisPutnam

Any chance you're using Vimium? I had this same issue, and after excluding the site for Vimium, it started working.

BosukPark

@ChrisPutnam This was the case for me. Thank you!

zaphodski

ESC with Vim keybindings does not work for me. Using latest Firefox on OS X Catalina 10.15.7. Can't get back to NORMAL mode after INSERT. Too addicted to Vim to use anything less so Repl.It is currently unusable for me.

pak112731

There is a way to get back into the editor though without having to reach for your mouse after hitting "esc". All you have to do is either "tab" then "shift-tab", or "shift-tab" then "tab".

pak112731

I think everyone's misunderstanding his question. After using "esc" key to get back to normal mode, you have to use the mouse to click back into the editor screen. This is a bad user experience for vim users.

CodeLongAndPros

I would like actual Vim, just like repl.it provides a shell.

Highwayman

Hum maybe use like a small man in the middle type thing? It’s practically defeating the purpose of vim I’m guessing but it’s better than nothing...

TheForArkLD

uhhh esc key is probably working.