Expand All
Welcome to Nova!
Projects
Editor
Terminals
Previews
Git
Tasks
Debugging
Remote Files
Extensions
Appendix: Settings
FAQs
Support

Text Actions

Sort your lines and zap your gremlins.
New! in Nova 13

Nova supports a number of text actions that allow you to easily manipulate and sort through lines in a document, as well as find and remove unwanted characters such as null or control characters.

Line Operations

These operations allow you to sort lines in a particular order, join multiple lines together, reverse the order of lines, and remove any repeated lines. This can be especially useful for sorting through log files or script outputs.

These commands can be found in the Editor menu > Line. If text is selected, these operations will only be performed on selected lines. If there is no selection, these operations will apply to the entire document, with the exception of Join Lines.

The Editor > Line menu.

Sort Lines

Select Editor > Line > Sort Lines… to open the Sort Lines interface.

The Sort Lines interface.
The Sort Lines interface.

You can use Sort Lines to reorder all the lines in the current document based on the settings you select in this pane.

Type
Choose whether to sort lines alphabetically, by total length (in characters), or shuffle all lines.
Case Sensitive
If checked, if two lines start with the same character but with different cases (a vs A), lowercase characters will be sorted first. When disabled, the same letter in different case are treated as equivalent and will simply be ordered as they first appear in the document.
Numeric Sensitive
If checked, alphabetical sort will treat numeric characters at the start of a line as whole numbers. For instance, 10 will be sorted after 2. If disabled, 10 will be sorted before 2 because only the first character (1) is used for sorting.
Ignore Indentation
If checked, Nova will ignore any leading whitespace characters on the line when sorting.
Reverse
If checked, lines will be sorted in reverse order. For instance, alphabetical sort will be from Z to A, while length sort will be ordered from longest lines to shortest.
Unique
If checked, duplicate lines will be removed from the final output.
Action
By default, Nova will replace the content of the document with the sorted result when using Sort Lines. However, you can choose to have Nova show the sorted lines in a new tab instead, leaving the original document untouched. You can also choose to copy the result directly to the clipboard without modifying or creating any files.

Join Lines

Combine multiple selected lines together, removing newline characters and indentation. Joined lines will be separated by a single space.

Joining selected lines.

Reverse Lines

Reverse the order of all lines, such that the last line becomes the first line.

Reversing all lines.

Unique Lines

Filter any repeated lines, leaving behind only the first instance of any recurring line.

Filtering only unique lines.

Zap Gremlins

Occasionally, annoying invisible or invalid characters may find their way into your files. This can result in parsing errors, compilation issues, or odd behavior when navigating through your documents. When these gremlins appear, Nova can help you zap them.

The Zap Gremlins interface.
The Zap Gremlins interface.

From the Editor menu > Zap Gremlins…, you can choose what kind of characters to remove from your documents, and tell Nova what to do with them.

Find

Choose what characters to designate as gremlins for zapping.

Non-ASCII characters
Matches any character not defined in the ASCII encoding set (Wikipedia). This includes most non-Latin and accented characters, so is not enabled by default.
Control characters
Matches characters typically used for controlling hardware functions. Includes anything in the Unicode Cc and Cf (compart.com) sets except for tabs, line feeds, and carriage returns.
Null (ASCII 0) characters
Matches null characters (ASCII 0, Unicode U+0000, etc.).

Action

Choose the mechanism for zapping.

Delete
Remove matched characters entirely from the document.
Replace with…
Specify a character or characters to replace matched characters with.
Replace with codepoint
Replace matched characters with their codepoint for the document’s current text encoding.
Replace with HTML entity
Replace matched characters with the equivalent HTML entity.