VS Code: Case sensitive replacement after pressing Crtl - D

With 1.37 (July 2019), it is possible through a find/replace (which now can replace by preserving case).

  • Issue 9798 has been implemented by PR 78003.
  • issue 78397 has been implemented by PR 79111 (1.38 only) for search/replace.

From 1.37 release notes:

You can now preserve case when doing replacement in the editor's Find widget. The feature is turned on when the Preserve Case option (AB button) is turned on in the editor's Replace input box.

https://code.visualstudio.com/assets/updates/1_37/preserve-case-button.png

Currently VS Code only supports preserve Full Upper Case, Full Lower Case, and Title Case.


Shortcuts are Alt + C for case sensitive. There is a little toolbar appears at the top-right corner of the VS Code, to let you toggle search options.

enter image description here

or you just Ctrl + F to toggle replace mode.

enter image description here