Predefined Live Templates for Razor
This topic lists all predefined live templates for Razor in ReSharper 2021.1. For more information about live templates, see Create Source Code Using Live Templates
| Template | Details |
|---|---|
ctx | Current file context Scope everywhere Body $CTX$ Parameters
|
nguid | Insert new GUID Scope everywhere Body $GUID$ Parameters
|
<script | Create script tag Scope HTML and similar tags Body <script type="$attributeValue$">$END$</script> Parameters
|
t | Create tag Scope HTML tags, Razor tags Body <$TAG$>$END$</$TAG$> Parameters
|
tc | Create closed tag Scope HTML tags, Razor tags Body <$TAG$ $END$/> Parameters
|
a | Create tag attribute Scope HTML and similar attributes Body $ATTR$="$END$" Parameters
|
@inherits | Razor inherits directive Scope Razor CSharp tags Body @inherits $TYPENAME$
$END$ Parameters
|
@model | Razor model directive Scope Razor CSharp tags Body @model $TYPENAME$
$END$ Parameters
|
@section | Razor section Scope Razor CSharp tags Body @section $section$
{
$END$
} Parameters
|