# Tips & Tricks

# Quickly populate default HTML/PHP code for a page

Whisk's Code Snippets can hold commonly used bits of code, including entire pages. While Whisk by default creates blank documents, you can insert the "Default Page" as a good starting point. The default keyboard shortcut is Command-Shift-D. The code can be modified by editing the Snippet if it does not meet your needs.

# Performance Tips for large documents

  • Make sure that the refresh in the options palette is set to either a delay or to manually.
  • Turn off gutter line numbering in the editor preferences.
  • Turn off Syntax Highlighting by unchecking the Text:Syntax Highlighting menu item.

# Tab to inserts spaces

By default, Whisk does not insert spaces when the tab key is pressed. However, because any key can be used to for inserting a snippet, the tab key can be overridden. Simply create a new snippet, and in the Pre-insert Snippet Code, type as many spaces as you would like to enter. In the Shortcut Key, press the tab key once, and then save the snippet. Now, the tab key will insert spaces!

WARNING

Shifting blocks of text right will still insert tabs.

# Send text through a command line program

Whisk currently uses the command line to evaluate PHP code. This program can be manually changed by editing the Path to PHP binary field in the advanced preferences. For example, the path could be changed to /usr/bin/wc, and when the PHP mode is selected, it will instead give a line, word, and character count.

WARNING

The path field does not accept arguments, but a shell script could be used to supply them to the program you wish to use.