Minor Editor Features#

Noctule provides several minor but helpful features in the editor to help you work with Swift code.

Code Folding#

Code folding allows hiding or collapsing sections of Swift code.

Automatic Code Folding#

Noctule supports automatic code folding. The settings are available on page Preference → Editor → General → Code Folding.

Imports
Noctule automatically folds imports if you enable the generic setting of your IDE at Fold by default → General → Imports on the folding page.
Multi-line comments
Noctule automatically folds multi-line comments if you enable the setting at Fold by default → Swift (Noctule) → Multiline comments.
Method bodies
Noctule automatically folds the blocks of method declarations if you enable setting Fold by default → General → Method bodies on the folding page.

Join Lines#

Edit → Join Lines is available to automatically insert a semicolon if you join two or more lines with statements.

Automatic Insertion of Quotes#

If you enter the beginning of a simple or a multi-line string literal, the matching end is automatically inserted. For example, typing " turns this into "" and entering #""" automatically inserts """# on a new line.

Escape Handling for Copy & Paste#

If the setting Editor → General → Smart Keys → Swift → Escape text on paste in string literals is enabled, Noctule will automatically escape text when pasting new text into a string literal. It will also unescape text when you copy selected text from a string literal.

Code Author Code Vision#

The author retrieved from Git is shown next to type declarations, functions, methods, initializers and deinitializers. This integrates with the Author Code Vision settings of the IDE, which are explained here in JetBrains’ online documentation.

Focus Mode#

Noctule integrates with Preferences… → Editor → General → Appearance → Highlight only the current declaration. If this setting is enabled, then only the current declaration is highlighted as usual in the editor. Other declarations are shown in a dimmed color.