News for hackers. Stuff that matters.
Re:Editors (Vim) by jedwards1211 on Friday June 05, 2020 @10:59PM (#23436424)
Vim emulation in VSCode worse than any other IDE I've used.

All extensions have to run on the same thread in a background process and intercepted keystrokes are passed to that process over IPC. So if other extensions (like the TS language tools) are tying up the extension host process, the Vim extension can't respond to your keyboard input until other extensions yield.

Performance issues come and go but for awhile I was stuck waiting for several seconds any time I typed a < after an identifier.

A lot of us have tried to demand a separate process for extensions that intercept keystrokes to solve this issue permanently. But the maintainers don't really care.

Re:Editors (Vim) by chongli on Friday June 05, 2020 @11:22PM (#23436542)
As a long time vim user, I’ve tried VSCode a few times and I cannot for the life of me figure out what all the hype is about. Can anyone who is proficient with it explain the philosophy behind it and what makes it so great? This is a sincere question, not a rhetorical one.
Re:Editors (Vim) by pvg on Saturday June 06, 2020 @12:37AM (#23436865)
It's Emacs for Javascript people - a good thing since Emacs is moribund and most programmers are at least a little bit Javascript people. A highly programmable, cross-platform editor with zillions of extensions/modes that support all sorts of languages and environments. People complain about its resource requirements and performance, just like they did with Emacs. Vi(m) users are the natural enemy of VSCode, just like they were the natural enemy of Emacs, continuing their long proud tradition of being wrong about everything. I think that's roughly where it fits 'philosophically'.
Re:Editors (Vim) by yjftsjthsd-h on Saturday June 06, 2020 @01:01AM (#23436948)
I'm going to partially disagree.

> It's Emacs for Javascript people

I'll accept this premise.

> a good thing since Emacs is moribund

And here we part ways.

> and most programmers are at least a little bit Javascript people.

You might be living in a bubble.

> A highly programmable, cross-platform editor with zillions of extensions/modes that support all sorts of languages and environments.

Agreed; I think you're actually underselling how helpful it is that it's apparently a lot easier to get started with than emacs or the vi family. Power tools with a lower learning curve is a good thing.

> People complain about its resource requirements and performance, just like they did with Emacs.

And they're right to do so, especially with Moore's law wearing thin. Besides which, emacs (and n/vim, for that matter) are still around, and are just as functional in a much smaller resource footprint.

> Vi(m) users are the natural enemy of VSCode, just like they were the natural enemy of Emacs, continuing their long proud tradition of being wrong about everything.

LOL, that's... semi-fair, even if you're on the wrong side, of course;)

> I think that's roughly where it fits 'philosophically'.

I think it's fair to call VSCode "EMACS but with JS", but I think you're really glossing over the issues that it has in practice; maybe with a decade of maturation it'll be on par, but today I would argue that it is a resource hog, and still suffers from some poor design choices (such as letting extensions trample eachother, per the upthread discussion).

Re:Editors (Vim) by bitwize on Saturday June 06, 2020 @01:31AM (#23437058)
It's not really.

The difference between VSCode and Emacs is the difference between an extensible editor and a software omnitool intended to be extended, shaped, and refined as you work with it. Writing short programs in Emacs Lisp, seeing their effects immediately in the live editor environment, and then (should they prove generally useful) refining them into full-fledged modes or commands is quite a bit different than writing a packaged extension.

There is, still, nothing like Emacs in the editor world today. As much as Visual Studio Code gets right, it has a long way to go to get within spitting distance of Emacs in terms of adaptability and power (to say nothing of resource consumption).

Re:Editors (Vim) by pvg on Saturday June 06, 2020 @01:15AM (#23437006)
You might be living in a bubble.

I think the relative sizes of the 'Most programmers have at least some minimal familiarity with Javascript' bubble and the 'Emacs is not moribund' bubble speak for themselves and offer sufficient retort :)

Re:Editors (Vim) by thunderbong on Saturday June 06, 2020 @02:04AM (#23437172)
This shows the stance of the people in the different "editor groups" perfectly! I'll never understand why programmers get so attached to their tools that they start evangelizing it for everyone else. Just look at the other responses to this comment. People are either questioning each bit or are trying to defend them.

If it work for you good, if not, fine. Just don't get crazy about it. It's just an editor!!

Re:Editors (Vim) by pvg on Saturday June 06, 2020 @02:37AM (#23437292)
A big, fun part of any hobby or craft that involves tools is kvetching about the tools. It's often at least as fun as the practice of the hobby or craft itself.
Re:Editors (Vim) by Cyph0n on Saturday June 06, 2020 @12:49AM (#23436910)
> continuing their long proud tradition of being wrong about everything.

Why do you think that Vim users were/are wrong about everything?

Re:Editors (Vim) by pvg on Saturday June 06, 2020 @01:01AM (#23436949)
I don't! That's just a dumb joke. A thing that I semi-seriously think: modal editing is not some uniquely interesting or advantageous way to navigate and edit text. A thing that I mostly-seriously think: most more recent methods for editing and navigating code are a lot better vim-style modal text editing.
Re:Editors (Vim) by Cyph0n on Saturday June 06, 2020 @01:39AM (#23437085)
Modal editing is very efficient imo. Once you get used to it, there is no going back. Plus, in my experience, it’s much easier on the wrists in general.

But I think Vim bindings in an IDE or Vim with a LSP plugin is the killer combo.

Re:Editors (Vim) by webgoat on Saturday June 06, 2020 @01:30AM (#23437057)
I expected it was because of the vim crowd's belief that a small footprint is essential for some reason. I use evil mode in emacs and can't understand why vim people place arbitrary limits on themselves when emacs is a more full IDE experience that costs them very little to jump to.
Re:Editors (Vim) by Cyph0n on Saturday June 06, 2020 @01:43AM (#23437106)
I use a remote machine at work for all development. With tmux + Vim, I get persistent editor sessions with native performance.

The alternative used to be writing code over VNC (not fun!), but we’re now moving towards VS Code Remote. I don’t see myself changing to it anytime soon, though.

Re:Editors (Vim) by szemet on Saturday June 06, 2020 @01:19AM (#23437027)
The only thing what makes modal editing bearable (from UX PoV) is the unlimited undo.

e.g. Would anyone take a plane that has modal cockpit buttons?

Re:Editors (Vim) by xenomachina on Saturday June 06, 2020 @04:37AM (#23437645)
All editors are modal, just to different extents. In Notepad, if you type a letter it inserts it, unless you have some text highlighted, in which case it replaces that text. "Some text is selected" is a mode.

The big thing that classic vi got wrong with modes from a usability perspective is that changing modes is mostly invisible. In vim, however, you can configure it to change the cursor shape in different modes, and this is a pretty effective cue. (It's also the default behavior in gvim.)

Re:Editors (Vim) by Cyph0n on Saturday June 06, 2020 @01:52AM (#23437136)
What does flying a plane have to do with editing and navigating code?
Re:Editors (Vim) by szemet on Saturday June 06, 2020 @08:08AM (#23438584)
It happens me every day: I just start to type while still in command mode, and then have to press "u" a couple of times.

(But ok, thats maybe just me - thought this is a common experience, and I just wouldn't like to sit behind a pilot doing the same...)

Re:Editors (Vim) by chongli on Saturday June 06, 2020 @02:51PM (#23441438)
This problem can be mitigated to an extent with a vim setting to change the cursor from a block to a vertical line when you enter insert mode. After using it for a bit your brain will learn to look for the vertical line before typing.
Re:Editors (Vim) by pvg on Saturday June 06, 2020 @11:44AM (#23439938)
This sort of thing has been a factor in airplane accidents - pilots becoming confused about stuff like the automation regime they're in.
Re:Editors (Vim) by pokernaming on Friday June 05, 2020 @11:55PM (#23436695)
I use vscode daily for everything, from note taking to programming. Here are my pros and cons.

Pros: - Has plugins for anything.You're doing C++, just install C++ plugin and you're good to go. Want vim key bindings there's a plugin for that as well. I use a plugin that can scrape competitive coding websites and automatically create tests for a problem. - Git, snippets, etc all modern IDE features built-in. - It is also found on many websites as an editor.

Cons: - Since it's electron. System requirements are on the higher end.

Re:Editors (Vim) by j-james on Saturday June 06, 2020 @01:13AM (#23436999)
It's worth mentioning that even though it's Electron, it's fairly well optimized Electron.

Idle, it takes up a third of a gig of RAM on my laptop. Language server extensions are responsible for the majority of the load users encounter. That's certainly a good 2-3 times more than Sublime Text, but it's not going to be a deal breaker for a majority of people.

Re:Editors (Vim) by blondin on Saturday June 06, 2020 @12:46AM (#23436897)
cons: extensions.

sharing part of OP's sentiment. in fact, i flipped the table a few weeks back because an extension downloaded a tool to my system and guess what? the installation got stuck. and guess what? my text editor hung!

all i wanted was to edit text. i didn't even ask for an extension. i was presented with one that supposedly would make my text editing experience better.

tiring...

Re:Editors (Vim) by kart23 on Saturday June 06, 2020 @02:56AM (#23437354)
these are my favorite features, in no particular order.

* Tons of quality extensions, incredibly easy to install and manage

* Good color schemes

* ssh extension - remote vscode with all your plugins, themes, etc. with basically zero setup

* integrated terminal

I have no doubt that you can get a better vim setup, but getting vim fine-tuned takes a while for me and figuring out what I like. VSCode is convenient and easy, and works on everything, no suprises. Don't have to worry about fonts, terminal colors, config files, etc. I do think the vim plugin for VSCode is garbage compared with the terminal.

Re:Editors (Vim) by oehtXRwMkIs on Friday June 05, 2020 @11:38PM (#23436617)
It's very featureful and very easy to pick up. So I speculate that most of its popularity is with people that unfortunately have not yet been enlightened by vim/emacs.
Re:Editors (Vim) by chongli on Friday June 05, 2020 @11:46PM (#23436646)
The article said 1.4 million people have installed the Vim plugin for VSCode. That's a sizeable chunk. Presumably a bunch of those people really like the editor.
Re:Editors (Vim) by EduardoBautista on Saturday June 06, 2020 @12:37AM (#23436864)
I used Vim for several years before switching to Sublime Text 3.0 and now VS Code. VS Code support for TypeScript is just unmatched on any other editor.
Re:Editors (Vim) by EQuimper on Saturday June 06, 2020 @05:59PM (#23442596)
Webstorm typescript feel better for me
Re:Editors (Vim) by jussij on Friday June 05, 2020 @11:55PM (#23436692)
> I was stuck waiting for several seconds any time I typed

The worst behaviour of any editing environment is a lagging keyboard response.

In this COVID-19 era I've found myself working remotely over VPN and on some occasions the response times become very slow.

The most noticeable observation for me is how frustration writing code becomes whenever my editing environment slows over that lagging VPN.

Tasks that are normally subconscious suddenly turn into mental challenges as you find yourself constantly checking if these subconscious actions actually complete.

Re:Editors (Vim) by jrockway on Saturday June 06, 2020 @01:51AM (#23437133)
I don't think there is any need to suffer just because you have a slow connection. You can use mosh if you're editing on a remote machine, or sshfs if your editor is on your workstation. I have heard that you can run the Language Server on the remote machine as well, for things like completion/indexing/etc. (I personally always just ssh to the remote machine and use Emacs though. Then I have the same environment at home and work and don't have to sync anything.)
Re:Editors (Vim) by satvikpendem on Friday June 05, 2020 @11:50PM (#23436672)
https://marketplace.visualstudio.com/items?itemName=asvetlia...

This is using a real neovim instance rather than emulation, and performance is excellent for me.

Re:Editors (Vim) by fstarship on Saturday June 06, 2020 @12:25AM (#23436826)
I second that and would like to point out that apt-get only saves an old copy of neovim. I had to install the latest version using snap.

This issue is described in the link but I thought it deserves highlighting

Re:Editors (Vim) by wildrhythms on Friday June 05, 2020 @11:20PM (#23436535)
I use VS Code w/ vim mode for NodeJS/Angular/React development and haven't noticed performance issues; granted, I'm running on a beefy Windows PC since it's the only good option I've found for vim on Windows.

On Mac/Linux I just use neovim with coc[1], which works beautifully.

[1] https://github.com/neoclide/coc.nvim

Re:Editors (Vim) by lawn on Friday June 05, 2020 @11:20PM (#23436531)
I don't use it myself but it's possible to embed Neo Vim in VSCode. So you're able to use edit text using a real instance instead of relying on a crappy emulation.
Re:Editors (Vim) by fstarship on Friday June 05, 2020 @11:29PM (#23436572)
I am not entirely sure if you are referring to https://marketplace.visualstudio.com/items?itemName=asvetlia...

I just switched after using vs vim and got much better performance.

I had neovim installed anyway for the EX commands

Re:Editors (Vim) by lawn on Saturday June 06, 2020 @02:07AM (#23437182)
Yes, that's it.
Re:Editors (Vim) by tazard on Friday June 05, 2020 @11:20PM (#23436528)
This makes so much sense. Thanks for explaining that.