Live data from Hacker News

Show HN: Build your own Vim emulation for VS Code

johtela.github.io

21–30 of 51 posts

Re: Show HN: Build your own Vim emulation for VS Code

#21

It's disappointing to see from comments here that there's no true and performant Vim integration for VS Code. It used to be the same thing with Eclipse and JetBrain's IDEs. Whatever Vim plugins existed were slow and falling into the uncanny valley, where they lacked support for many features or did things in slightly unexpected ways. Torn between Vim and effectively Vimless IDEs, I chose to stick to the former and do…

> It's disappointing to see from comments here that there's no true and performant Vim integration for VS Code.

I've been using vscodevim daily for almost 2 years, and (for me) it's totally usable. IMHO, much better experience than trying to turn Vim into an IDE.

Re: Show HN: Build your own Vim emulation for VS Code

#22

Why use VSCode at all then? I've found coc.nvim and language servers to be every bit as good as VSCode in terms of code completion and definitions. I'm mostly writing Go, C, Javascript, and HTML/CSS. But, so far it's been working great. And, I'm a fairly recent convert to vim (neovim).

I switched because I found that it was a more coherent experience overall. With vim I was always editing my vimrc file and struggling to make plugins play well together.

That might be specific to my requirements/preferences or it might just be the fact that I am not skilled enough but in spite of issues (that I outlined in another comment https://news.ycombinator.com/item?id=22385285), I still find it more pleasant.

Re: Show HN: Build your own Vim emulation for VS Code

#23
post #2

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…

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.

Re: Show HN: Build your own Vim emulation for VS Code

#24
post #2

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…

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

Re: Show HN: Build your own Vim emulation for VS Code

#25
post #2

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…

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...

Re: Show HN: Build your own Vim emulation for VS Code

#27
post #11

Earlier quoted context omitted.

One of the best resources that I have used (in the distant past) is vim golf[1]. It's a super fun way to level up your vim skills. [1] https://www.vimgolf.com/

The issue I always had with it is that you can’t see the really good answers (unless that’s changed). I wanted to push an “I give up” button so I could access answers that would help me learn.

That was always the best part of ProjectEuler was seeing everyone else’s answers after solving the problem.

Re: Show HN: Build your own Vim emulation for VS Code

#28
post #2

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…

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] j…

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.

Re: Show HN: Build your own Vim emulation for VS Code

#29
post #28

Earlier quoted context omitted.

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] j…

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.

Re: Show HN: Build your own Vim emulation for VS Code

#30
post #14
post #6

Vim's power doesn't come from using single-letter commands to do things but, rather, in the language-like (action, verb, noun) expressions the whole ecosystem enables: "daw" to delete a word, "cit" to replace the "inner" part of a tag and start typing, numbered prefixes to execute an action that number of times, etc. See also: https://stackoverflow.com/questions/1218390/what-is-your-mos... aka "Your problem with Vim…

OP here. I completely agree with that. The goal of ModalEdit is not to emulate those verb-noun commands. VS Code's commands operate on selections, so it is very cumbersome to turn them to work in Vim way. Instead, you should try to mimick something like [Kakoune][1] which is another modal editor that uses the selection as command target. I'm sure ModalEdit doesn't tempt any hardcore Vim users to use VS Code. But ther…

Well, this certainly looks interesting. You mean I could use ModalEdit as a basis to bringing Kakoune like selection behaviour to VS Code as long as I'm willing to configure it? I have played with Kak, but Code's extensions are easier to use and more powerful still. I so very much would like to get the best of both.

Have you used Kakoune yourself? Is there something that's currently not feasible with VS Code using ModalEdit? I'm still going through ModalEdit docs to get an idea of what's possible.

Also, Literate Configuration is a good idea. I don't suppose there's a Jupyter notebook like editor available where markdown and code parts can be seen alongside in fully rendered form?

Post reply on HN