Hacker News new | ask | show | jobs
by city41 2306 days ago
This is an interesting approach. I find the popular vim emulation extension (vscodevim) is a bit buggy and has lots of "uncanny valley" gaps.

At work I use vscodevim, and at home I use vim with TypeScript plugins. Both approaches have lots of annoyances. Maybe a weekend dedicated to ModalEdit could give me the experience I'm really after. I'm also excited for Oni Vim 2, which is a commercial product who's promise is to provide the best of both vim and VS Code.

5 comments

Let us not disparage VSCodeVim in the least. #1: .vimrc support. Simply huge. Not everything is there, but a lot is.

Also, they are responsive. The big outstanding thing for me is Code's behavior with respect to opening a new file/buffer. Tabs are owned by splits whereas it's the other way around in Vim, and that's fine, but the Vim default of replacing the active file/buffer must be!

I figured out a workaround [0] just this week with a little help, but more importantly, after suggesting that this feature make it into the extension, I received a prompt reply [1]. These people are doing great work that really matters for me professionally.

Good luck implementing the 8,000,000 Vim features that you use and don't even think about by starting with nothing but a context for mode-switching.

[0] https://stackoverflow.com/questions/60216168/vscode-open-fil...

[1] https://github.com/VSCodeVim/Vim/issues/4559

I don't mean to disparage it. Apologies if my post came off that way. I certainly appreciate it and understand emulating vim is not an easy task.
Yeah, I was thinking I may have been a bit aggro there. It's just a coincidence that I only recently embraced IDE life (finally!), and it's in no small part because of this extension. Cheers.
No, I appreciate the call out. My intention wasn't to be negative, but I really was in retrospect. I will be more mindful in the future.
One of the most annoying thing with this extension is that it maintain a different revert history that is conflicting with the normal one. Sometimes you just have to close a file without saving it because undo/redo is broken.

And it's extremely slow on medium to large files and it gets slower and slower until you restart vscode.

I have a love hate relationship with this extension. It's terrible but vscode without it feels worse to me. Sometimes I wish I didn't met vi in my life.

I’ve kind of learned how to juggle the two disconnected undo buffers in my mind. If I want to just go “back in time”, repeating even my previous undo/redos, I use Ctrl-Z. To undo a quick mistake I use Vim’s undo. I guess I treat them like short-term and long-term “undo” actions.

Sounds kind of weird now that I’ve put it in writing. It works for me but YMMV.

Heh, that’s how I feel after reading this article. I don’t use vim a lot, haven’t gotten used to it. It must be so frustrating always having to chase that “vim experience” in every editor, but never quite getting it.
Have you tried the neovim integration setting? I find that almost everything works as I would expect it to nowadays.
I am using it and I am considering disabling it on a daily basis. Not only is it slow as mentioned elsewhere, it interacts poorly with other VSCode features, like automatic bracket matching, intellisense etc. I find that when recording macros, I have to be very careful to consider what the vim part might think just happened and try and work around it.

But every time I disable it, I immediately miss normal mode. So yeah, as happy as I am with VSCode (which is a lot), the situation is suboptimal.

As an advanced (neo)vim user, I respectfully disagree. Vim integration in VS Code is sluggish and buggy (see folds and macros, for example).
That only uses neovim for ex mode. Full integration of neovim requires digging into less widely used extensions such as https://github.com/asvetliakov/vscode-neovim

I found vscode macros particularly painful. Slow & where vim optimizes things. Typing abc^H^Hsdf will seamlessly play out as asdf, but with vscodevim I have to watch the macro repeat my mistake each time

I have used this extension a bit and it works great as far as I can tell. Whereas with the older popular VS Code vim extension, I would get broken behaviour within minutes of use. And I am not a particularly proficient vim user, this would have just been navigating, using visual mode a bit, correcting some stuff.
this one or something else? https://marketplace.visualstudio.com/items?itemName=asvetlia...

I've been waiting for someone to make that work before diving into vscode and if it's solid looks like I have my weekend project.

The vscode-vim extension has an option to use neovim for ex mode commands
Your take on vscodevim is a sort of "glass half empty" kind of argument. To be fair, vscodevim is fantastic and it gets a lot more thing right than it gets wrong.
I also had problems, mostly around multiple cursors, and found the less popular amvim to be much better. I have not run into any problems with it so far, hopefully this will work for you too

https://marketplace.visualstudio.com/items?itemName=auiworks...