question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[vim-repeat] insert mode

See original GitHub issue

Hello.

Given the following invalid JSON (it’s missing the EOL commas ,):

{
  "line1": "1"
  "line2": "2"
  "line3": "3"
  "line4": "4"
}

In Vim with the vim-repeat plugin, if I type the following sequence on "line1" to insert the comma at the end of the line:

A,ESC

Then I move down to "line2" and type the . and then down to "line3" and type the . again it will repeat and insert the comma at the end of each of those lines. It doesn’t seem like this behavior is currently working in vscode-neovim.

Other vim-repeat behaviors including those coupled with vim-surround like cs"' work fine. I would assume the issue is related to switching over to insert mode and VSCode taking back control?

I’ve got 🤞 the solution doesn’t require listening to events in insert mode as from a few other issues that sounds like a non-starter due to performance reasons.

Thanks for the hard work on this project!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:12
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

9reactions
paldepindcommented, Jan 18, 2020

@justinmk

Better idea: if the text inserted by vcode were sent to Nvim as an edit instead of just syncing the buffer, the problem would go away. The plumbing needed for this is not in Nvim yet (though I’m working on it). Might be better to wait until then.

Is there an open Neovim issue one can track for that addition? I think the promise of this VSCode plugin is amazing but unfortunately, with this issue present, it completely breaks at least my Vim workflow.

8reactions
asvetliakovcommented, Feb 10, 2020

For anyone interested here is test version (rename to vsix and install it through Install from VSIX in vscode):

vscode-neovim-0.0.51.zip

Far from ideal but basic repeating should be supported

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inserting Text Repeatedly in Vim (Example) - Coderwall
To insert some text repeatedly in Vim, say you want to insert '-' for 30 times. ... Thats it, you can use this...
Read more >
Repeating a character n times in Insert mode
If you want to insert a character (say, an asterisk, * ) 10 times in your document, then in Vim's command mode you...
Read more >
repeat insert at beginning of line - Vi and Vim Stack Exchange
Use block visual mode: 0 Ctrl+V , select the range, I (capital i ), ## , Esc . · Shift+V , select extent,...
Read more >
The Only Vim Insert-Mode Cheatsheet You Ever Needed
Vim's insert mode still contains many useful features apart from normal mode. You can repeat phrases, delete chunks, access registers, ...
Read more >
Insert Mode - Learn Vim
If you type "hello world!" and exit insert mode, Vim will repeat the text 10 times. This will work with any insert mode...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found