Privide similiar functionality with Visual Studio's case-preserving-find-and-replace.
When search term is "begin", replace term is "end":
- begin -> end,
- Begin -> End,
- BEGIN -> END
When search term is "onetwothree", replace term is "fourFiveSix":
-
onetwothree -> fourfivesix,
-
oneTwoThree -> fourFiveSix,
-
OneTwoThree -> FourFiveSix,
-
oneTwoTHREE -> fourFiveSIX
-
Not support case:
- ONETwoThree -> FOURFiveSix (Actual: -> FourFiveSix)
- ONETwoTHREE -> FOURFiveSIX (Actual: -> FourFIVESIX)
Currently, there's no way to create a widget similar to the native find and replace widget, which limits its usability. Therefore, it will be not released and only for personal use.
npm install --global vsce
vsce package
Then install the generated file: <project root directory>/case-preserving-find-and-replace-0.0.1.vsix into local VS Code:
Open the command palette by pressing (Ctrl+Shift+P
or Cmd+Shift+P
on Mac),
and type Case-Preserving Find and Replace (Current File)
in the search box:
The program will prompt you for a Search Term and a Replace Term, one after the other. Enter each term and press Enter. The text will then be replaced accordingly.