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

All ex commands cause editor window to freeze #3013

Closed
jplew opened this issue Aug 31, 2018 · 6 comments
Closed

All ex commands cause editor window to freeze #3013

jplew opened this issue Aug 31, 2018 · 6 comments

Comments

@jplew
Copy link

jplew commented Aug 31, 2018

Describe the bug

Vim works fine until I attempt to submit an ex command (eg: :s/before/after/g, :t25 .).

I see the keystrokes being recorded in the bottom status bar, but when I hit enter nothing happens and my cursor freezes. The command remains in the status bar, but I can't input any text into the editor window or issue any normal commands.

The menus still work, but the only way for me to enter text again is to close the window and and reopen it.

I've been experiencing this problem for over a month now.

To Reproduce
Steps to reproduce the behavior:

  1. Open any file
  2. Type :t1 .

Expected behavior
I expect line 1 to be copied.

Environment (please complete the following information):

  • Extension Name: vim
  • Extension Version: 0.16.2
  • OS Version: Darwin x64 17.7.0
  • VSCode version: 1.26.1

Additional context
I have replicated this problem in VSCode 1.27.0-insider as well.

The problem still occurs even after disabling all other extensions.

@justinmk
Copy link

What if you remove your vimrc?

See also #1735 (comment)

@jplew
Copy link
Author

jplew commented Oct 11, 2018

What if you remove your vimrc?

See also #1735 (comment)

I don't have a ~/.vimrc

If I set "vim.enableNeovim": false the problem goes away, and I can run substitutions (:s/foo/bar)

@justinmk
Copy link

justinmk commented Oct 12, 2018

Sorry it's not clear to me if you mean the literal path ~/.vimrc. By "vimrc" I mean any nvim config file such as ~/.config/nvim/init.vim.

Do you see any errors or other prompts if you start nvim directly, in your terminal?

If I set "vim.enableNeovim": false the problem goes away, and I can run substitutions (:s/foo/bar)

That doesn't help narrow down the cause of why nvim might be blocking for input ...

@jplew
Copy link
Author

jplew commented Oct 12, 2018

I have no ~/.config/nvim directory. Any place else I should look?

Yes, I get the following error when I launch nvim from the Terminal: E576: Error while reading ShaDa file: last entry specified that it occupies 101 bytes, but file ended earlier.

@jplew
Copy link
Author

jplew commented Oct 12, 2018

Update: I got it working.

You were right about the neovim launch error. It seems my main.shada file was corrupted. I deleted ~/.local/share/nvim/shada/main.shada and now neovim works as expected. Thanks @justinmk !

@jplew jplew closed this as completed Oct 12, 2018
@justinmk
Copy link

Two thoughts about that:

  • VSCodeVim has no use for shada (AKA viminfo) currently, so it should start Nvim with shada disabled, nvim -i NONE ...
  • VSCodeVim should check nvim_get_mode and checking blocking flag of the result. If blocking=true for more than, say, 1 second, it should send CTRL-c to cancel the prompt.

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

3 participants