Change Snippets settings in CotEditor on Mac

Use Snippets settings in CotEditor to define preset texts to insert with a command or by dropping a file onto the editor.

To change these settings in the CotEditor app on your Mac, choose CotEditor > Settings, then click Snippets.

Command
OptionDescription
Command definitions Define the snippet insertion command. The commands defined here is assigned to the Text > Insert Snippet menu.
  • Syntax: The snippet is available and listed in the snippet menu only when a document having this syntax is frontmost. If this field is empty (All), all documents are eligible.
  • Name: The name of the command that appears in the menu for this snippet.
  • Key: A keyboard shortcut to perform this snippet insertion command. A shortcut is optional and can be left blank.
Insertion formart Set the text to be inserted with the command selected in the command definition list above.
  • When a snippet contains <<<CURSOR>>>, the word <<<CURSOR>>> is removed on insertion and move the insertion point there instead.
File Drop
OptionDescription
File drop definitions Define the conditions to perform the file drop. When files are dropped directly into the editor and the conditions defined here are fulfilled, the text that matches the files can be inserted at the drop location.
  • Syntax: The setting is performed only when a file is dropped to a document having this syntax. If this field is empty (All), all documents are eligible.
  • Extensions: The setting is performed only when a file with one of these extensions is dropped. If this field is empty (All), all files are eligible. No dot is required for file extensions. You can set multiple extensions by separating them by a comma.
  • Description: You can use this field to leave a comment about the row. This field doesn’t affect the file drop behavior and can be left blank.
Insertion formart Set the text to be inserted for the condition that is selected in the file drop definition list above.
  • In an insertion format, you can use CotEditor’s variables. Variables are going to be replaced with the corresponding information of the dropped file. See Write insertion format for File Drop for each variable’s details.

See also