
Pretty neat, huh? There are a few other shortcuts you should be familiar with to get the best out of it. You might wonder why I wouldn’t just use find/replace? After all, with the ability to find or replace using regular expressions, you can do some pretty powerful things.īut regular expressions are complicated, and since discovering this shortcut I find I rarely need them.

You can keep pressing it to select more instances of the same string, too. The editor finds the next instance of that string in the document and highlights that, too. You highlight some text, then press Ctrl + D. It functions somewhat like a find/replace. VSCode provides several mechanisms for placing cursors, but this is the one I use the most: Ctrl + D ( Cmd + D on Mac). This means that you can write the same thing in multiple places. Such functionality allows you to place multiple cursors in the document that all accept input from your keyboard at the same time. I’m not sure what the name for the specific action is, but it is part of the multi -cursor functionality that Visual Studio Code and some other IDEs have. I suppose I should tell you what it is and what it does. In the likely event that you are overcome with excitement, I will pause a moment so you can compose yourself… The impatient amongst you may have already looked at the photo and tried the shortcut out for yourself. Kudos to the first person who leaves a comment with the answer. NB- A similar shortcut exists in IntelliJ, though I can’t for the life of me remember what it is. Hell, it’s not even just for developers - everyone should be using this shortcut, which is one reason I would recommend Visual Studio Code over Notepad++ for the casual note taker. It’s not even new, but I frequently talk to developers who’ve never heard of it. Shift-left-uppercase (e.g.I’m not given to hyperbole, but this might be the greatest breakthrough since the splitting of the atom.Uppercase all from a lowercase letter within words (e.g.Lowercase all from an uppercase letter within words (e.g.Find: (\s)() ( \s matches spaces and new lines, i.e.Hit the Match Case button at the left of the search bar (or Alt C) and, borrowing some examples from an old Sublime Text answer, now this is possible: $0 matches all selected groups, while $1 matches the 1st group, $2 the 2nd one, etc. \u ]: first character becomes uppercase.\l ]: first character becomes lowercase.This is done through 4 "Single character" character classes (Perl documentation), namely, for the matched group following it:

Now an uppercase and lowercase switch can be done simultaneously in the selected strings via a regular expression replacement (regex, Ctrl H + Alt R), according to v1.47.3 June 2020 release:
