Change Snippets settings in CotEditor on Mac

In the CotEditor app on your Mac, use Snippets settings to manage text that you can insert using commands or by dropping files onto the editor.

To change these settings, choose CotEditor > Settings, then click Snippets.

Command
OptionDescription
Command definitions

Define commands for inserting snippets. These commands appear in the Text > Insert Snippet menu.

  • Syntax: The snippet is available only in documents using this syntax. If this field is empty (All), the snippet can be used in any document.
  • Name: The name of the command as it appears in the menu.
  • Key: A keyboard shortcut to insert this snippet. A shortcut is optional and can be left blank.
Insertion format

Set the text to insert when the selected command is applied.

You can use variables in the insertion format. These variables specify the relationship between the insertion point and the inserted text. See Create insertion formats for command snippets for details about each variable.

File Drop
OptionDescription
File drop definitions

Define how File Drop inserts text when files are dropped into the editor. When files are dropped into the editor and the defined conditions are met, CotEditor inserts the corresponding text at the drop location.

  • Syntax: The rule applies only when a file is dropped into a document using this syntax. Leave this field empty (All) to apply the rule to all documents.
  • Extensions: The rule applies only to files with the listed extensions. Leave this field empty (All) to apply the rule to all files. Enter extensions without a leading period, separated by commas.
  • Description: Optional field for leaving a note about the rule. This field doesn’t affect File Drop behavior.
Insertion format

Set the text to insert when the selected File Drop rule is applied.

You can use variables in the insertion format. These variables are replaced with information from the dropped file. See Create insertion formats for File Drop for details about each variable.

See also