Hi !
Today post is about a Visual Studio Extension, one which makes you happy: Case Converter. The extension name is self descriptive, however:
This extension allows you to convert code from PascalCase format to snake_case, or from snake_case for PascalCase format. Or event working with camelCase format.
So, internally you mus define the formats you want to use and a format for the conversion flow. In example A >> B >> C >> A … Once you have this defined, you can select a piece of code and convert
snake_case >> PascalCase >> camelCase >> snake_case >> PascalCase >> camelCase >> …
In the next animation, you can see how this variable name is converted in 3 different format every a couple of seconds with the keyboard shortcut Ctrl + Shift + K, Ctrl + Shift + C
The conversion flow can be defined in the IDE Options, in the specific section for Case Converter.
I like to use code using PascalCase format. And, when you switch between projects and review tons of code, you probably found some code which makes you cry. At this point I usually talk with the team, and we all agree to perform a very useless commit, which only have cosmetic changes, mostly focused on source code style.
But you know, that night I can finally sleep well!
Greetings @ Burlington
El Bruno
References
- Visual Studio Marketplace, Case Converter
- MSDN Capitalization Conventions