Live data from Hacker News

VS Code can do that?

vscodecandothat.com

231–240 of 280 posts

Re: VS Code can do that?

#231
post #216

Earlier quoted context omitted.

I like VS Code and Atom, so please understand my criticism here doesn't come out of hate or disdain. Vim has a pretty huge community of plugins, and with NeoVim that plugin development has greatly accelerated. Intero, Fireplace, Vim FSharp (which works on regular Vim as well), and NeoComplete are excellent, and make NeoVim competitive with a lot of IDEs in my mind. Part of the reason I don't use VS Code is that I rea…

It's just a guess, but I think the main reason to run VSC in a browser is that they can later also let in run in a browser, without install. You will develop, store, and run your code on Azure, without any local installation. (I don't know if that is a great vision, but it is a good rationale to use Web tech for IDE development)

I know this is like a "you can get something as good as Dropbox by just running an FTP server" thing that you see on HN occasionally, but if I wanted that, I conceivably could just run a VM on Azure/AWS/Digital Ocean and SSH in for development with NeoVim. I guess the interface wouldn't be as streamlined though.

Re: VS Code can do that?

#232

Earlier quoted context omitted.

I don't know how people program without this feature You must do some kind of programming I've not encountered in my many years. While my editor of choice can do this, I would have no idea how, because a feature like "increment duplicates" is needed so infrequently that I would never remember the shortcut.

It's one of those things that is incredibly useful. Of course it's possible to survive without it, but it's like saying "I don't know how people program without Copy and Paste". It helps.

Copy and paste is something that I use many times a day, even when I'm not programming. Needing to do the same edits over multiple lines doesn't happen often in my code.

There are appropriate plugins available for my editor, but I've never felt the need to install them.

Re: VS Code can do that?

#233

Earlier quoted context omitted.

This exists in most editors I've used (intellij is alt + shift + click or double tap alt, if I recall). I don't know how people program without this feature - they should teach this shit in school. Multicursor is amazing. One thing it's been great for: I have code like: byte b1 = array[0]; And I want to do this for 16 bytes. Control + D to duplicate 15x. Double tap control, hit up 15 times - now there's a cursor at e…

I don't know how people program without this feature You must do some kind of programming I've not encountered in my many years. While my editor of choice can do this, I would have no idea how, because a feature like "increment duplicates" is needed so infrequently that I would never remember the shortcut.

I've got to agree. It's one of those things that could save me a minute of manual editing every once in a long while, but I feel like there have to be lower-hanging fruit, in terms of increasing my editing speed.

Re: VS Code can do that?

#235

Earlier quoted context omitted.

Why?

E.g., it's easier to count the number of =s if there's no ligature.

What use cases do you have to regularly count characters eyeballing it? The characters are still distinct and equal width in the code and the line length doesn't shift, so it's just a visual thing...

Re: VS Code can do that?

#236

Earlier quoted context omitted.

I started playing with emacs 24 years ago, then spent 20 years as a devoted vim user with a two year work-enforced gap in Eclipse. I tried spacemacs in evil mode about four years back and stayed for magit. I tried VSCode a few weeks ago to see what the fuss was about and had my Eclipse PTSD triggered. Magit, mu4e, elfeed, eww, multiterm, restclient.el, tramp, [edit]org-mode![/edit], the list of replacements for bloat…

I am using vim for years now, and I haven't written more than 50 lines of vimscript apart from the bundles. Most of the thing that I have written is just maps, some configuration for other bundles, and some copied better defaults. I still don't get it when people say they heavily use elisp. Can anyone give example of a highly custom thing that you do in emacs/vim/any other editor, for which there is no famous bundle…

I think you've assumed the wrong premise. At least for me. It's not the highly customised things, it's the accumulation of the small things that are either missing, inconvenient, slightly annoying or somewhat different to your needs.

Every package developer makes choices about how their package works (and built-in behaviour too), but sometimes that clashes with what you want, or is somehow inadequate.

It's those small conveniences that have a disproportionate impact.

I'm not saying you can't do similar in vim or there aren't other ways to achieve the same goal, I'm saying that over time, those minor improvements have a huge impact.

Here's 2 examples:

1) Splitting a window horizontally by default splits 50:50 but on a 16:9 monitor I usually want the new buffer (right) to be smaller than my current buffer (left). So I override the defaults.

2) I use paredit for lisp based languages, but (as far as I'm aware) there's no built in-command to copy (or paste) the s-expression surrounding the cursor's current position.

I often find myself wanting to do exactly that e.g. in a let or a cond form in Racket. So I wrote a couple of small functions to do just that, bound them to keyboard shortcuts and I've now made a minor extension that fits exactly what I want to do. Since lisp is based on s-expressions it turns out this extension to someone else's package is incredibly versatile and useful.... TO ME!

    (let [(x (some-function with args)] 
I press my chosen key-combination and it becomes

    (let [(x (some-function with args)] 
         [(x (some-function with args)] 
ready to edit the new s-expression

Re: VS Code can do that?

#237
post #89

Earlier quoted context omitted.

I do maybe 10% of the time as it saves a few keystrokes if you are renaming stuff. I would be annoyed if it went away. But definitely not as useful as it was 40 years ago.

But "keystroke" is a very strange metric. In terms of speed, it's often much faster to just ctrl+a and rewrite it from scratch. The mental gymnastic in trying to compute in your head the difference of characters is definitely non-trivial. It only really works if the thing you're replacing has the exact same number of characters in it. Can you explain the exact scenario you use it in, I honestly can't think of a scena…

My friend's wife uses CapsLock instead of Shift for each and all capitalization needs, even the sort of capitalization done in this sentence.

Re: VS Code can do that?

#238

Earlier quoted context omitted.

I am using vim for years now, and I haven't written more than 50 lines of vimscript apart from the bundles. Most of the thing that I have written is just maps, some configuration for other bundles, and some copied better defaults. I still don't get it when people say they heavily use elisp. Can anyone give example of a highly custom thing that you do in emacs/vim/any other editor, for which there is no famous bundle…

I think you've assumed the wrong premise. At least for me. It's not the highly customised things, it's the accumulation of the small things that are either missing, inconvenient, slightly annoying or somewhat different to your needs. Every package developer makes choices about how their package works (and built-in behaviour too), but sometimes that clashes with what you want, or is somehow inadequate. It's those smal…

In vim, when you're in visual selection mode, you can type `ib` (inner block) to select the innermost parenthesized block's interior or `ab` to include the parentheses. If you type these commands multiple times, the selection widens to the next, next, next ... enclosure.

There are other similar commands in the category, like a" for selecting the interior of a double-quoted literal and such.

They are documented under ":help visual-operators".

Re: VS Code can do that?

#239

My favorite is multi-selection mode. It's not the same as "Column Mode" you find in other IDEs but try it and you will never want another editor again: (Option)Alt-Cmd + Down or Up arrow key From there, you can use arrow keys as normal, but instead of controlling one carrot, you control all the ones you created. So if I use the shortcut key to move to the next word, they all do, same with end of line, or what have yo…

This exists in most editors I've used (intellij is alt + shift + click or double tap alt, if I recall). I don't know how people program without this feature - they should teach this shit in school. Multicursor is amazing. One thing it's been great for: I have code like: byte b1 = array[0]; And I want to do this for 16 bytes. Control + D to duplicate 15x. Double tap control, hit up 15 times - now there's a cursor at e…

I end up doing everything like that in emacs keyboard macros.

For your example, this is the kmacro I ended up with:

    ;; Keyboard Macro Editor.  Press C-c C-c to finish; press C-x k RET to cancel.
    ;; Original keys: 2*M-f M-DEL b C-x C-k TAB C-a 2*C-k 2*C-y C-p
    
    Command: last-kbd-macro
    Key: none
    
    Macro:
    
    2*M-f                   ;; forward-word
    M-DEL                   ;; backward-kill-word
    b                       ;; self-insert-command
    C-x C-k TAB             ;; kmacro-insert-counter
    C-a                     ;; move-beginning-of-line
    2*C-k                   ;; kill-line
    2*C-y                   ;; yank
    C-p                     ;; previous-line
(after you've created a macro, you can get the above by doing M-x kmacro-edit-macro.)

Re: VS Code can do that?

#240
post #115

Earlier quoted context omitted.

I keep hearing good things about VSCode. If I weren't essentially married to emacs I'd definitely try it out. I'm not sure I'd recommend emacs to everyone at this point, though I think it remains a really solid choice of editor/OS for people willing to get over the learning curve and put up with a bit of clunkiness. Re the git stuff though- one place that I'm pretty sure emacs is the uncontested champ is in git integ…

I started playing with emacs 24 years ago, then spent 20 years as a devoted vim user with a two year work-enforced gap in Eclipse. I tried spacemacs in evil mode about four years back and stayed for magit. I tried VSCode a few weeks ago to see what the fuss was about and had my Eclipse PTSD triggered. Magit, mu4e, elfeed, eww, multiterm, restclient.el, tramp, [edit]org-mode![/edit], the list of replacements for bloat…

[deleted]
Post reply on HN