Add Format Selection In Context Menu Visual Studio 2022

Here I showed how to format code using shortcuts in Visual Studio 2022. But especially I can forget hotkey and I prefer to have a ‘Format Selection’ in the context menu. Check these steps to add the ‘Format Selection’ option to your context menu:

Step 1 – Menu Tools -> Customize

VS Menu Tools -> Customize”/></p><h2><span class=Step 2 – Commands Tab -> Context Menu -> Editor Context Menu -> Code Window -> Add Command

Add Command Visual Studio

Step 3 – Edit -> Selection Format

Selection Format Command

Format Selection in Context Menu

Selection Format in Context Menu

Hope it was useful. Enjoy!

Leave a Comment