Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't leave insert mode (pressing ESC) on GitHub Codespace #7005

Closed
MicaelJarniac opened this issue Aug 17, 2021 · 9 comments
Closed

Can't leave insert mode (pressing ESC) on GitHub Codespace #7005

MicaelJarniac opened this issue Aug 17, 2021 · 9 comments

Comments

@MicaelJarniac
Copy link

Describe the bug
Can't leave insert mode (pressing ESC) on GitHub Codespace

To Reproduce
Steps to reproduce the behavior:

  1. Go to a GitHub repository (on https://github.com), like https://github.com/VSCodeVim/Vim
  2. Press the dot . key (should take you to https://github.dev/[...], like https://github.dev/VSCodeVim/Vim)
  3. Go to the Extensions tab
  4. Search for vscodevim.vim and install it
  5. Go back to the Explorer tab
  6. Open any file (like README.md)
  7. Click on the text so as to set focus to it
  8. Verify normal Vim navigation works (h, j, k, l)
  9. Enter insert mode (i)
  10. Verify inserting text works
  11. Try to leave insert mode by pressing ESC
  12. Verify you're still in insert mode, and focus has been lost from the editor
  13. Click back on the text to set focus to it again
  14. Repeat steps 10 to 12 as many times as desired
  15. Give up

Expected behavior
When in insert mode (or any mode, for that matter), pressing ESC shouldn't break focus from the editor.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: v1.21.6
  • VSCode version: 1.59.0
  • OS: Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.134 Safari/537.36
@ShonFrazier
Copy link

Seems to me this is more "vscodevim.vim not functioning in any way in Codespaces"

@mefryar
Copy link

mefryar commented Aug 25, 2021

Thanks for filing this @MicaelJarniac. I'm having the same issue with Gitpod (e.g. https://gitpod.io/#https://github.com/PEZ/get-started-with-clojure) so the problem is not unique to Codespaces.

@J-Fields
Copy link
Member

Duplicate of #6826

@J-Fields J-Fields marked this as a duplicate of #6826 Oct 14, 2021
@MicaelJarniac
Copy link
Author

#6826 seems to have been fixed, but I'm still having the issue reported here.

@J-Fields
Copy link
Member

@MicaelJarniac Are you sure the web app is capturing the <Esc> key press? Like, if you disable VSCodeVim, does <Esc> work as it should in VSCode?

@MicaelJarniac
Copy link
Author

I believe the ESC key is working as it should without the extension:

GIF

On the GIF, I was typing on the editor, then bringing up that box with CTRL+SHIFT+p, typing on it, then hitting ESC to exit it, and the focus was correctly restored to the document, without me having to click it.

Might be worth mentioning, the browser I use is Vivaldi, based on Chromium.

@cyanff
Copy link

cyanff commented Jun 16, 2022

You most likely have a browser Vim emulator like Vimium, and it's capturing your inputs.

Solution

Disable Vimium on github.dev

Details

Why does the escape key work in the command palette but not the editor?

  • Vimium stops capturing keys when you're in a text prompt.
  • Vimium does not see the editor as a text prompt. -> Input is captured.
  • Vimium sees the command palette as a text prompt. -> Input is released.

@MicaelJarniac

@MicaelJarniac
Copy link
Author

@thisisphan I was not using any extension like that, so I don't think that's exactly what was going on, but thanks for the suggestion.

@dbanks12
Copy link

dbanks12 commented May 12, 2023

You most likely have a browser Vim emulator like Vimium, and it's capturing your inputs.

Solution

Disable Vimium on github.dev

Details

Why does the escape key work in the command palette but not the editor?

* Vimium stops capturing keys when you're in a text prompt.

* Vimium does not see the editor as a text prompt. -> Input is captured.

* Vimium sees the command palette as a text prompt. -> Input is released.

You just solved a tangentially related issue of mine where Vimium was capturing my <Esc> when trying to use any in-browser editors in their "vim mode" (HackMD in my case).

I know this is not directly related to this issue, but thank you ser! 🙏 @thisisphan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants