1 day ago · Tech · hide · 0 comments

I love multiple cursors. Thank you, Sublime Text, for delivering them unto us all those years ago. Here are two commands I’ve known about but haven’t properly built into muscle memory. I’ll cite the VSCode-specific names and shortcuts, but I imagine most editors with multiple cursors will have their own equivalents. Command-Shift-L: Select All Occurences of Find Match. This will select every occurence of the currently selected text. Or, if there’s no active selection, it will select every occurence of the word under the cursor. This is awesome for making rapid edits across an entire file. Shift-Option-I: Add Cursors to Line Ends. Select several lines of text, hit this shortcut, and you’ll get individual cursors at the end of every selected line. If you want cursors at the start of the lines instead, press Command-<left arrow>. This is super for making the same transformation across a group of lines. Fun stuff. See the VSCode docs for more.

No comments yet. Log in to reply on the Fediverse. Comments will appear here.