Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Notice how quickly you can select characters along a column. Please let me know if there is a way to do this as quickly and painlessly in other editors.

Drag your mouse while pressing meta on VS Code. I certainly think Vim is powerful, and I've spent enough time in it to be able to edit a file solely via ex. But I think VS Code is making some awesome progress, too. I like using the two editors together



> Notice how quickly you can select characters along a column. Please let me know if there is a way to do this as quickly and painlessly in other editors.

Yeah, what? Seriously?

JetBrains: command-shift-8 to toggle column select mode.

And if you forget that, just control-click and you can select it in the popup menu.

The only explanation for boneheaded statements like these are that vi/emacs nuts haven't used a modern IDE in decades.


Almost 3 years of VS code usage, I can not remember which meta key.

Doesn't help that I use a Windows keyboard on Mac some days, and a Windows machine on others.

Also mice suck (but are orders of magnitude better than track pads), I always find selecting columns this way to be super finicky and I often have to do it twice to get it just right.


As common as this argument is, I've always found for me that there's a hierarchy in "ease of use" for text selection that isn't quite as simple as "device X is always better". From quickest to slowest:

* Keyboard command that requires no counting or precision and has no easily-confused variants. In almost all editors this encompasses up, down, left, right, home, end, select or delete a line, and so on; some editors have more sophisticated ones like "select all in enclosing characters", or Vim's non-parameterized text objects ("cw" for "change word" as opposed to "dt6f" for "delete to the sixth occurrence of 'f' or maybe to the character in front of it, I always forget which").

* Mouse selection in any editor that lets you do multiple clicks to change selection object (e.g.: single click character, double click word, triple click line; on a Mac this is nearly any editor, including the text box I'm typing in right now). This isn't as precise as a correctly-executed keyboard command like "dt6f" or some Emacs equivalent, but it requires less cognitive switching: you don't have to think about the command and you don't have to do any counting. You just know you want to select from there to there. If you mess up, it rarely requires any effort to recover.

* Keyboard commands that require you to think carefully before composing them. This is where Vim, god love it, sometimes falls down hard. I know exactly what I want to select, but I have to stop and think about the "best" way to select it, and if I screw it up, I have to get back to where I was and try again -- which may require yet more thinking. I don't doubt that there are people who are just super good at this and get it right first try evey time, and those people are... well, probably not much faster than someone who gets selection right with the mouse every time.

tl;dr: Mice do not suck, and I like trackpads, dammit.


> Mouse selection in any editor that lets you do multiple clicks to change selection object (e.g.: single click character, double click word, triple click line

Keyboard does that better than mouse IMHO. Alt-arrow to skip between words, alt-shift-arrow to select word to left or right.

Use correct meta or home/end key along with shift and arrow key to select the entire line, based on your platform of choice.

I'd like to see some more intelligent selection hotkeys though. JumpingBetweenCamelCase, "everything inside the quotes" { data:'inside', the:'braces'}


I think whether the keyboard is "better" than the mouse depends to a degree on where and what you're selecting. If I want to start the selection at or very close to where the cursor is at the moment, I'm going to use the keyboard; if it's somewhere else on the screen, though, the mouse might well be quicker. (I just experienced both of those when I wanted to change the last phrase in that last sentence, and the cursor was all the way at the bottom of this comment, then wanted to edit something just one line above. The latter case, keyboard; the former case, mouse.)

> Use correct meta or home/end key along with shift and arrow key to select the entire line, based on your platform of choice.

Ideally this is just one command, I think, like Cmd/Ctrl+L for "select current line". :)

> I'd like to see some more intelligent selection hotkeys though. JumpingBetweenCamelCase, "everything inside the quotes" { data:'inside', the:'braces'}

The only editor that I've found that does both of those out of the box is BBEdit for the Mac, which uses Ctrl+left/right and Opt+left/right to navigate and select by word but Ctrl stops for camelCase and underscore breaks while Opt doesn't. And Cmd+B, "Balance," selects text between enclosing characters in the current scope: brackets, parentheses, quote marks, etc. I'm not sure why equivalents to these aren't more common in other editors.


> Ideally this is just one command, I think, like Cmd/Ctrl+L for "select current line". :)

I find it easier to, instead of remember another command, remember "jump to start of line, select entire line."

Mentally composable and it works in all text input boxes across the entire system. (MacOS, cmd-l selects current line in VS-Code, jumps to URL bar in Chrome.)

IMHO the problem is getting stuff to be system wide. Per editor hotkeys, or even worse. hotkeys added by plugins, cause dissonance when I sit down at someone else's computer, or just switch apps.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: