I often find myself writing
var message = \"Hello {0}\";
and then going back and typing in
var message = string.Format(\"He
You can almost do this with a Visual Studio snippet (i.e. without ReSharper).
Save the following as a file with a .snippet
extension.
string format
Matthew Strawbridge
Wraps the selected text with string.Format
SurroundsWith
variable
value
Then you can load it via Tools | Code Snippets Manager | Import.
Once the snippet is available, you can type
var message = "Hello {0}"
but you'd have to select the string and then press CtrlK CtrlS and select the snippet name to apply it. This would generate
var message = string.Format("Hello {0}", value);
with the value
part selected for editing.
Edit: There's also a Snippet Designer extension that makes working with snippets easier.