JetBrains Rider 2023.3 Help

Predefined live templates

This topic lists all predefined live templates in JetBrains Rider 2023.3.

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 Live Templates

Template

Description

C#

ctx

Current file context

nguid

Insert new GUID

join

Join clause in language integrated query

from

Language-Integrated Query

foreach

foreach block

itli

Iterate a IList<T>

itar

Iterate an array

ritar

Iterate an array in inverse order

for

Simple "for" loop

sfc

Safely cast variable

psvm

The "Main" method declaration

outv

Print value of a variable

out

Print a string

asrt

Make an assertion

asrtn

Assert expression not null

thr

throw new

pci

public const int

pcs

public const string

psr

public static readonly

prop

Property

ear

Create an empty array

#if

#region

enum

else

else statement

~

Destructor

ctor

Constructor

cw

Console.WriteLine

class

Exception

struct

forr

Reverse 'for' loop

namespace

interface

sim

'int Main' method

indexer

svm

'void Main' method

unsafe

unsafe statement

unchecked

unchecked block

tryf

try finally

try

try catch

switch

switch statement

while

while loop

iterator

simple iterator

propg

Property with a 'get' accessor and a private 'set' accessor

Attribute

Attribute using recommended pattern

do

do...while loop

checked

checked block

if

if statement

lock

lock statement

mbox

MessageBox.Show

using

using statement

hal

ASP.NET MVC Html.ActionLink

ua

ASP.NET MVC Url.Action

rta

ASP.NET Controller RedirectToAction

attachedProperty

Attached property

dependencyProperty

Dependency property

test

baker

DOTS Baker

componentdata

DOTS IComponentData

jobentity

DOTS IJob Entity

VB.NET

ctx

Current file context

nguid

Insert new GUID

foreach

For Each block

itar

Iterate an array

itli

Iterate generic System.Collections.Generic.IList(Of T)

for

Simple "For" loop

ritar

Iterate array in reverse order

Dim

Declare a variable

asrt

Make an assertion

out

Print a string

outv

Print value of an expression

pssm

Public Shared Sub Main

sfc

Safely cast a variable

sub

Subroutine declaration

fun

Function declaration

dc

DirectCast clause

tc

TryCast clause

ct

CType clause

ByRef

ByRef parameter

ByVal

ByVal parameter

sel

Select case statement

attachedProperty

Attached property

dependencyProperty

Dependency property

test

Razor

ctx

Current file context

nguid

Insert new GUID

<script

Create script tag

t

Create tag

tc

Create closed tag

a

Create tag attribute

@inherits

Razor inherits directive

@model

Razor model directive

@section

Razor section

ASP.NET

ctx

Current file context

nguid

Insert new GUID

<script

Create script tag

t

Create ASP.NET tag

tc

Create closed tag

a

Create tag attribute

<asp:HyperLink

ASP.NET Hyperlink

foreach

foreach block

Unity

ctx

Current file context

nguid

Insert new GUID

assetmenu

Unity CreateAssetMenu attribute

logwarn

Unity log warning

logex

Unity log exception

menuitem

Unity menu item handler

sfield

Unity serialized field

logerr

Unity log error

log

Unity log object/message

reqcomp

Unity RequireComponent attribute

sprop

Unity property with serialized backing field

cor

Unity coroutine method

logvar

Unity log variable

int

ShaderLab Integer property

blendmultiplicative2x

ShaderLab Blend 2x multiplicative (srcdst+dstsrc)

float

ShaderLab Float property

surf

ShaderLab Surface Shader

shader

ShaderLab Shader block

tex3d

ShaderLab 3D property

vec

ShaderLab Vector property

blendadditivesoft

ShaderLab Blend soft additive (src*(1-dst)+dst)

blendadditive

ShaderLab Blend additive (src + dst)

vfshader

ShaderLab Vertex/Fragment Shader

tex2d

ShaderLab 2D property

blendtransparent

ShaderLab Blend traditional transparency (src*srcAlpha+(1-srcAlpha)*dst)

cubearr

ShaderLab CubeArray property

blendmultiplicative

ShaderLab Blend multiplicative (src*dst)

cube

ShaderLab Cube property

tex2darr

ShaderLab 2DArray property

color

ShaderLab Color property

blendtransparentpremul

ShaderLab Blend premultiplied transparency (src+(1-srcAlpha)*dst)

vfpass

ShaderLab Vertex/Fragment Shader Pass

Last modified: 30 November 2023