- Press CTRL-H ( ⌥⌘F on Mac ).
- Press ALT-R ( ⌥⌘R on Mac ).
- Type
_([a-zA-Z])
. - Press TAB and type
$1
. - Press ALT-ENTER ( ⌥ENTER on Mac ).
- Press F1 and type
upper
, then press ENTER. - Press CTRL-ALT-ENTER ( ⌥ENTER on Mac ).
VS Code (and Atom) currently use JavaScript-style regular expressions for the find/replace feature so the replace operation doesn't support switches that are available in other editors like Vim (example: \u\1
) or Sublime Text (example: $1-\L$1\E
).
The workflow above will achieve the same results.
Hmm, the purpose of ALT-R is to simply switch to regex mode. I've tested once again on Win10 (I usually use Kubuntu) and it works fine on my end, no other keypress configuration.
The keypress doesn't produce any outstanding visuals, it only selects the regex option in the Find/Replace dialog.