Live Templates#

Live templates let you quickly create common code elements in a source file.

Please refer to JetBrains’ documentation about live templates to learn more about the feature.

Swift Live Templates#

Noctule provides live templates for Swift files. All available live templates are shown below.

AbbreviationTitleDescription
classClass declarationInserts a declarations of an empty class
structStruct declarationInserts a declarations of an empty struct
protocolProtocol declarationInserts a declarations of an empty protocol
actorActor declarationInserts a declarations of an empty actor
enumEnum declarationInserts a declarations of an empty union-style enum
extensionExtension declarationInserts a new extension declaration
funcFunction declarationInserts a declarations of an empty function
initInitializer declarationInserts an empty initializer declaration
deinitDeinitializer declarationInserts an empty deinitializer declaration
varVar declarationInserts an empty var declaration
letLet declarationInserts an empty let declaration
deferdefer statementInserts an empty defer statement
forfor-in statementInserts a new for-in statement

Objective-C Live Templates#

Noctule provides live templates for Objective-C files. All available live templates are shown below.

AbbreviationTitleDescription
logInsert new NSLog callInserts a new NSLog call as a new statement.
logmLog current function/methodInserts a new NSLog call statement to log the execution context.
pm#pragma markInserts a #pragma marker
forIndexed for loopInserts an index-based for loop.
whilewhile loopInserts a while loop.
ifif statementInserts an if statement.
ifelseif-else statementInserts an if statement with an else branch.
switchswitch statementInserts a switch statement with a default branch.
structstruct declarationInserts a struct declaration.
enumenum declarationInserts an enum declaration.
def#define directiveInserts a #define preprocessor directive.
inc#include directiveInserts a #include directive with a quoted path.
incs#include directive (system header)Inserts a #include directive with an angle-bracket path.
imp#import directiveInserts a #import directive with a quoted path.
guardInclude guardInserts an include guard derived from the file name.
intf@interface declarationInserts a class interface declaration.
impl@implementation declarationInserts a class implementation.
prot@protocol declarationInserts a protocol declaration.
extClass extensionInserts a class extension declaration.
catCategory declarationInserts a category declaration.
blockBlock typedefInserts a typedef of a block type.
initInitializer implementationInserts the canonical init method implementation.
props@property (strong)Inserts a strong property declaration.
propw@property (weak)Inserts a weak property declaration.
propc@property (copy)Inserts a copy property declaration.
propa@property (assign)Inserts an assign property declaration.
propro@property (readonly)Inserts a readonly property declaration.
ibacIBAction methodInserts an IBAction method.
eachFast enumeration loopInserts a for-in loop over a collection.
damdispatch_async on the main queueInserts a dispatch_async call on the main queue.
oncedispatch_once blockInserts a dispatch_once call with a static token.
afterdispatch_after on the main queueInserts a delayed dispatch_after call on the main queue.
swfNSString with formatInserts a stringWithFormat call.