News for hackers. Stuff that matters.
Re:Show HN: Magit for VSCode (Alpha) by kstrauser on Wednesday February 26, 2020 @12:26PM (#22425098)
That's amazing! After using Emacs for years, I switched to VS Code. Magit was one one of the things I really, _really_ missed from Emacs and I've never found anything remotely as nice. I'll definitely give this a try.
Re:Show HN: Magit for VSCode (Alpha) by Scarbutt on Wednesday February 26, 2020 @12:32PM (#22425161)
Tried vscode, but having to use the mouse for many operations put me off, raw text editing was also bad compared to emacs. To be fair this was for just two days trying to use vscode.
Re:Show HN: Magit for VSCode (Alpha) by kstrauser on Wednesday February 26, 2020 @04:24PM (#22427505)
It's definitely a different paradigm. A couple of notes on keyboarding though:

- VS Code has wonderful support for multiple cursors (see https://spin.atomicobject.com/2019/04/04/vscode-multiple-cur... for an example)

- VSC has a lot of the same ideas as Emacs, but they're called different things and the keystrokes are different. Cmd-P "terlogremo" <enter> opens the file "terraform/logging/remote_state.tf" in the current project. Ctrl-g 20 <enter> goes to line 20 in the current file.

- VSC has a lot of remappable key bindings. Check out https://code.visualstudio.com/docs/getstarted/keybindings to get started.

Again, Emacs is wonderful. I'm not going to try to talk anyone out of it. But I made myself use VS Code for a week and to adapt to its way of doing things, just as an experiment. By the end of the week, I was 90% as productive as with Emacs and I decided to stick it out. By the end of the second, I was more productive. It's just a really, really good fit for my own personal mental model of how code should be edited.

Re:Show HN: Magit for VSCode (Alpha) by dmortin on Wednesday February 26, 2020 @01:57PM (#22426003)
Why can't you run an Emacs with Magit alongside Vscode? You don't have to miss it, you can still use emacs for that.
Re:Show HN: Magit for VSCode (Alpha) by jimmyvalmer on Wednesday February 26, 2020 @02:12PM (#22426174)
This is like being on Android and having an IPhone just for some iOS-only app. It's brutal and flies in the face of all that is good and pure.
Re:Show HN: Magit for VSCode (Alpha) by kstrauser on Wednesday February 26, 2020 @04:01PM (#22427282)
That's a pretty good analogy. Firing up Emacs for just one thing is a pretty large side dependency. Also, Emacs's keybindings are jarring when bouncing back and forth between apps custom built for a particular OS. They're not bad in any way, just very different.
Re:Show HN: Magit for VSCode (Alpha) by dmortin on Wednesday February 26, 2020 @03:33PM (#22427012)
It's like using an external tool for something if it's better than the internal implementation of the editor for the same thing.
Re:Show HN: Magit for VSCode (Alpha) by rgrau on Wednesday February 26, 2020 @01:54PM (#22425963)
Die hard emacs user here (but looking sometimes into vscode). Which things you get from vscode that couldn't get in emacs? Are you definitely set?
Re:Show HN: Magit for VSCode (Alpha) by kstrauser on Wednesday February 26, 2020 @04:16PM (#22427401)
I've made the full switch. I still love Emacs, and if VS Code suddenly disappeared I'd switch right back. That said:

VSC looks and feels like a Mac app. Keyboard shortcuts to system services work the same there as in any other app. Emacs doesn't, however much time I spent trying to get it to do so. It also feels faster in a lot of ways because slow operations usually don't block UI updates.

VSC is way more popular lately, and it's extendable by people who don't want to learn elisp. I personally don't mind elisp at all, but I've come to accept that this is the minority position. So, what's that mean for VSC? It has a ludicrous number of packages / themes / etc., installable from the builtin package manager (that everyone actually uses; no more fetching code from some guy's website because he's politically opposed to the idea of a package manager), that actually work out of the box and are configurable through a GUI (or JSON if you want to commit the settings into source control).

I love Emacs, VSC is much better at editing Python than I've ever been able to configure Emacs to be. Linters and formatters are well supported and Just Work.

Here's the majority of my main settings.json file:

  {
      "files.trimTrailingWhitespace": true,
      "[python]": {"editor.rulers": [99]},
      "python.formatting.provider": "black",
      "python.formatting.blackArgs": ["--line-length", "99"],
      "python.linting.flake8Args": ["--max-line-length", "99"],
      "workbench.colorTheme": "Dracula",
      "editor.fontSize": 13,
      "editor.fontWeight": "400",
      "editor.fontFamily": "Fira Code",
      "editor.fontLigatures": true,
      "git.enableCommitSigning": true,
      "workbench.iconTheme": "material-icon-theme",
      "editor.formatOnSave": true
  }
It's clearly not as configurable as init.el, but look how easy it is to change the theme or font size, and to add vertical rulers, and to configure font ligatures. As it turns out, I would much rather have settings be that simple than to have a Turing-complete language for computing the config at runtime. Others will disagree, and that's OK. But for me, it gets rid of one more massive excuse for screwing around with my editor config instead of writing code.
Re:Show HN: Magit for VSCode (Alpha) by wjak on Saturday February 29, 2020 @02:53AM (#22449530)
Ability to run vscode in a browser