# Editing

# Editing basics

# Keyboard Manipulation

Whisk's Source Editor is a standard macOS text view. As such, all common keyboard shortcuts will work. Code Snippets can also be inserted via shortcuts.

# Syntax Highlighting

Whisk provides syntax highlighting for the following languages:

  • HTML
  • PHP
  • JavaScript
  • CSS

The editing language and render mode for previewing can be set via the Tools Inspector in the Options area. You can also disable syntax highlighting.

Colors and showing invisible characters can be adjusted in the Interface Preferences.

# Indentation

When making a new line, Whisk will preserve the leading indentation of the previous line. This can be configured in the Interface Preferences.

You can use the Outdent and Indent toolbar buttons, Text > Shift Right/Shift Left or Command-] and Command-[ to adjust the leading indentation of the current selected lines. If multiple lines of text are selected, the tab and shift-tab keys will also perform this function.

# Commenting

Use the Text > Comment Selection or Command-/ to toggle comments on and off for individual lines. This is context aware, so HTML code will make <!-- --> comments, CSS will use /* */, and JavaScript leads lines with // comments. Commenting shortcuts are also available as Code Snippets.

# Lines

Whisk will by default show line numbers in the gutter on the left. This can be disabled in the Interface Preferences.

To jump immediately to a specific line, you can choose the Text > Go to Line… menu item (or Command-L) and choose a line number to select.

Whisk's Go to Line sheet
Whisk's Go to Line sheet

# Find and Replace

Whisk uses OgreKit (opens new window) to provide Find/Replace functionality. This powerful find panel allows for entering regular expressions, highlighting multiple results, and much more.

Whisk's Find and Replace Panel
Whisk's Find and Replace Panel

# Spell Checking

Automatic spell checking is disabled, as this is often inappropriate for source code. You can choose the Edit > Spelling and Grammar menu to configure if/when the document is checked.


You can quickly spot-check spelling by hitting Command-; (semicolon). It will check starting at the current text cursor position.

# Configuring the editor

All other features and options for the Source Editor are configured in the Interface Preferences.

# Text Encodings

Text Encoding, otherwise known as character encoding (opens new window) or charsets, is how computers convert between on-screen text and their underlying data representation on disk. A language like English has very different characters than one like Japanese, so a different encoding is needed for computers to efficiently store the text. In the past, there were encodings used for both different languages and different operating systems, since the operating system creator often decided how they wanted to represent the characters on disk. In the last two decades, the world has slowly converged on a single standard, Unicode (opens new window), which can represent nearly every major language. As computers have become more powerful and we interact globally through the internet, efficient storage is less of a concern than compatibility. Specifically, Unicode's UTF-8 (opens new window) representation has become the most common and recommend text encoding.

By default, Whisk will open and save files using UTF-8. You probably will not need to change this.

However, older documents may have made use of different encodings. You can adjust the text encodings used to open and save documents in the General Preferences. The File Inspector allows you to set the text encoding for writing the file. This setting is preserved in Whisk's database tied to the file path.