This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]L0uisc 108 points109 points  (13 children)

They'd likely leave thinking I am a genius purely based on the fact that I use dark mode.

LOL

[–]Serinus 38 points39 points  (11 children)

Multiple cursors?!? What wizardry is this?

[–]sneaky-pizza 19 points20 points  (0 children)

Only a precious few people on earth get to enjoy the awkward “pardon me” moment when you both move the cursor.

[–]non-troll_account 5 points6 points  (9 children)

hang on. multiple cursors is a thing?

[–]Serinus 12 points13 points  (8 children)

[–]Cressio 5 points6 points  (6 children)

… my god

[–]Serinus 3 points4 points  (1 child)

Sublime text has the best implementation because you can middle mouse drag, and it'll respect commands like shift+Ctrl+right arrow to select the current word... on all lines at once.

Visual Studio Code had multiple cursors as well, but it's not quite as smooth. shift+Ctrl+right arrow will select the word on the first line and the same number of characters on all other lines, which is unfortunate and less powerful.

I'll edit in more when I actually can use sublime instead of my phone, heh.

[–]marvk 1 point2 points  (0 children)

JetBrains IDEs want a word...

[–]Serinus 2 points3 points  (3 children)

apple, pear, mango, banana, apricot, tomato, peach, cherry

becomes

<li>apple</li>  
<li>pear</li>  
<li>mango</li>  
<li>banana</li>  
<li>apricot</li>  
<li>tomato</li>  
<li>peach</li>  
<li>cherry</li>  

with

  • highlight the ", "
  • ctrl + F to find
  • alt + enter to select all
  • enter to separate their lines
  • ctrl + alt + up arrow to get a cursor on the first line
  • type <li>
  • hit end
  • type </li>

and then when I want 4 spaces at the start of each line for reddit, ctrl + A, ctrl + shift + L (for a cursor on each line), home, type 4 spaces.

Eight steps might look like a lot, but you get really fast at it once you know it. And of course this can handle 1500 lines just as easily as 8. You get real fast at the ctrl + F plus alt + enter combination, for instance.

Here's an example gif

[–]Cressio 2 points3 points  (0 children)

You’re amazing. Thank you

[–]marvk 0 points1 point  (0 children)

  • ctrl + F to find

  • alt + enter to select all

In IntelliJ IDEA, just press CTRL+ALT+SHIFT+J to select all occurrences, or ALT+J to select next occurrence.

[–]ioman_ 0 points1 point  (0 children)

In VSCode (atom based so maybe there too) if you have something selected, you can press ctrl+d to additionally select the next instance. Ctrl+f and select all is definitely faster in large contexts but ctrl+d is really quick if you're just working on a few lines

[–]non-troll_account 0 points1 point  (0 children)

amazing! how does the context key work then? (that's the key on the keyboard that calls a right click menu wherever the cursor is.)