How to reformat naming styles with ReSharper?
I don't believe ReSharper has a way to do a bulk rename like you want. Changing the C# Naming Styles will certainly highlight (as warnings) those local variables that need changing, but Code Cleanup won't correct them for you.
There are times when renaming a variable to match a convention might result in one symbol colliding with another symbol that already exists; I imagine that's why ReSharper doesn't allow the bulk rename.
Two ReSharper shortcuts may make this pretty quick (and this is assuming you have adopted ReSharper's shortcut keys for Visual Studio):
- Alt + PgDn - Go to next highlight (error, warning or suggestion). This will let you get from one misnamed variable to the next quite quickly.
- Alt + Enter - Open the "Quick Fix" menu and select "Rename...". This will rename the variable and update all references.
Starting from R# 8, there's the option to fix an issue in scope.
- Go to any occurrence of this issue
- Put the cursor on it
- Show potential fixes (CTRL+.)
- Select the first option 'Rename to xxx' and select 'fix naming in solution'
More info