A snippet is a piece of code that you want to save for later use.
Follow one of the following steps:
- Select "File " > "New Snippet " from the menu bar.
- Click "+" button opposite the search in second column.
- Press Cmd+N on macOS or Ctrl+N on Windows or Linux.
The snippet is created in the folder that is currently selected.
In the bottom right corner of the editor press the current snippet language, by default it is "Plain text", then select the language you need from the drop-down list.
Drag and drop the snippet into the desired folder.
Bring up the context menu by right-clicking on the snippet and selecting "Delete". The snippet will be moved to "Trash". If needed, you can restore the snippet by dragging it back into a folder.
To copy a snippet, either click the button in the top right corner of the editor or press Shift+Cmd+C on macOS or Shift+Ctrl+C on Windows and Linux.
Formatting a snippet in massCode is simple and easy to grasp. To format one, either select "Editor" > "Format" from the menu bar or press Shift+Cmd+F on macOS or Shift+Ctrl+F on Windows and Linux. ::: NOTE Not all languages can be formatted at the moment. This will change in the future. :::