Predefined Surround Templates
This section lists all predefined Surround templates in ReSharper 2019.2.
Live/Surround templates can be used for generating code in existing files and (if there is the $SELECTION$
parameter in the template body) for surrounding code fragments with template code, such as try...catch
statement.
Each live template is identified by a Shortcut — a short string of characters, for example foreach — that you can type right in the editor to invoke the template.
Index of Surround Templates
Template | Description |
---|---|
C++ | |
() | |
{} | |
forr | Reversed 'for' |
foreach | 'range-based for' loop |
do | do-while loop |
fori | 'for' loop pattern with integer index |
if | 'if' statement |
try | |
while | 'while' statement |
static_cast | |
struct | |
dynamic_cast | |
namespace | |
#if...#endif | |
const_cast | |
reinterpret_cast | |
cast | |
namespace ... | namespace ... |
class | |
incg | |
if...else | Put the selection into an |
XML | |
tag | |
C# | |
foreach | foreach block |
for | Simple "for" loop |
#if (Imported Visual C# Snippets) | |
#region (Imported Visual C# Snippets) | |
namespace (Imported Visual C# Snippets) | |
tryf (Imported Visual C# Snippets) | try finally |
try (Imported Visual C# Snippets) | try catch |
while (Imported Visual C# Snippets) | while loop |
do (Imported Visual C# Snippets) | do...while loop |
if (Imported Visual C# Snippets) | if statement |
lock (Imported Visual C# Snippets) | lock statement |
using (Imported Visual C# Snippets) | using statement |
cast | |
VB.NET | |
If | Put the selection into the statement block following |
If..Else | Put the selection into the statement block following |
SyncLock | |
Using | |
tc | |
ct | Transform the selection into the first parameter of the |
dc | Transform the selection into the first parameter of the |
namespace | |
JavaScript | |
{} | |
() | |
TypeScript | |
{} | |
() | |
ASP.NET | |
tag | |
link | |
HTML | |
tag | |
link | |
Razor | |
tag | |
link | |
HTML-Like | |
link | |
Angular 2 HTML | |
link | |
ASP.NET(C#) | |
foreach | foreach block |
ASP.NET(VB.NET) | |
foreach | For Each block |