vscode-neovim: dot-repeat problems
I tried the version posted in this thread. It works in some cases (changing a word, appending to end of line), but not in others.
Repeating the edit of oword
acts like a paste of a new line and the word wherever your cursor is.
Repeating the edit of inew word
would sometimes work and sometimes only insert the last part of it. I think it was the space and the second word, but I couldn’t get it consistent.
Repeating the edit of A (2)
replaces the last character in the line with ‘)’. I believe this has to do with vs code auto-completing the close parenthesis.
_Originally posted by @ngharrison in https://github.com/asvetliakov/vscode-neovim/pull/173#issuecomment-592776169_
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 31
- Comments: 23 (6 by maintainers)
Sorry for the silence guys, was sorting out life problems. Will be back working on it soon
Took some time, but latest master works very well with
.
. There are few differences with vim.
repeat explained in readme section. Going to release0.0.52
tomorrow or at Monday. Sorry for long waiting guys!I also see weird issues around dot repeats. I issue the following series of commands:
foo
I expected it would repeat the
foo
insertion, but it actually moves my cursor one character left. Doesn’t seem linked to which file type, same in typescript or text files…Well that explains it, it works if you build the current source code.
So until we get a new version, you can just install it from source:
That will generate a
vscode-neovim-0.0.50.vsix
file.Now in VSCode go to extensions, click the ellipsis at the top, and click install from vsix.
@asvetliakov don’t stress yourself out over this ❤️
Sorry, i didn’t knew you were from Spain. Please take care of your family and health.
@azizghuloum The extension was born when i got mad once again by using VSCodeVim. So no, no real insert mode unless vscode devs will have fixed their extension host (and they’re not willing to do that unfortunately). The lag problem is a thing that not happens for every person or every situation - it mainly depends what extensions are you using and how large and type-intensive your project.
Let me explain why it happens: once you handle
type
event you must senddefault:type
event to character appear as we’re doing it here. Normally it’s not the problem, but new characters triggersonDocumentChanged
event which is being handled by other extensions, including default ones, like language server clients. And they could block extension host, e.g:A
type
handler and sent back to vscode withdefault:type
eventA
and triggers document changed eventB
(this usually comes fast afterA
) - and nothing happens because the extension is waiting.As for your project, try to install
@types/aws-sdk
, include it somewhere in your project and see what happens.This should be handled in document changed event. Need to send changes to neovim from here. It’s not easy task though.
The same happens to me. Changing a word with cw works, then using dot-repeat acts as dw (it deletes the word and does not insert new text).
Not working for me either. dot operator is one of the key reason to use vim. Please fix it ASAP.
Not working for me either 😐
@chmac The issue is for unreleased version from #173 . In the latest released dot repeat doesn’t work at all.
Maybe a stupid question but how come this is a new issue? Did “dot-repeat” work properly before? Did it stop working because of changes in the vscode?
@azizghuloum The problem with handling the insert mode in neovim itself - is the long and sad story about performance and “type” vscode event. Once it’s listening type events in insert mode it starts to lag
I’m facing this problem as well. Just let me know if any help is needed.
I also have issues with this that keeps me from using the plugin since I use the dot operator with change operator so frequently.
I’d be more than happy to work on this bug if I can be pointed in the right direction or if someone would like to pair remotely on it.