### Split window:

You can choose to work with two different documents or two parts of the same document by splitting the window. You can only split the window so that you see one document over the other. You choose the document that should appear in the lower part by dragging it to the lower part of the documents list.

### View in separate window:

If you want to view the document in a separate window you can do so by double-clicking it in the documents list or choose the command in the View menu.

### View in full screen

You can edit the document in full screen (nothing else is visible, not even the menu bar) by choosing the command in the View menu. You return to the normal view by pressing the Escape-button on the keyboard.

### Functions

You can see a list of all the functions in your document in the Tools menu or with the toolbar item.

### Tabs

You see all documents in the documents as tabs by choosing the Show Tab Bar in the View menu.

### Encodings

Only a small selection of the available encodings are shown to begin with. You can choose to see more under Open & Save in Preferences. If you think that the characters are wrong you can test to reload the text with another encoding in the Text menu (this option is only available if there are no edits made to the document).

### Projects:

If you open the projects drawer you can sort all your open documents by dragging them to a project. These can then be saved automatically or to a file (note though that it doesn't include new unsaved files) with the extension .smultronProject. It can then open all those documents in just one step, if you e.g. are working on a project. For Smultron to recognise the file as a project, the extension needs to be smultronProject. You can also create a project by dragging a folder into the projects area.

### Snippets:

Snippets are pieces of text that you use often or want easy access to. You create a snippet by using the command in the Tools menu or by dragging it into the Snippets window. You can sort the snippets by dragging them into collections. You can also assign a shortcut key to the snippets so that you can insert the snippets by just using the keyboard - you do this by just placing the cursor in the Shortcut column and just press the shortcut you want. All snippets are listed in the Tools menu at the bottom. If you include one or several %%s in the text, they will be replaced by the current selection, if some text is selected when the snippet is inserted.

### Preview:

With this you can preview the HTML in the current document. If e.g. you are using a FTP-program to edit an external file you set the base URL of that file so that all relative links are loaded, e.g. for images and css-files. If you are editing the file index.html for the site www.apple.com you can put http://www.apple.com/ as the base URL for all the images to load correctly (as long as you are connected to the internet of course).

### Commands:

You can run commands within Smultron if you e.g. want to compile some code or make a file executable. You do that in the Commands window (or by choosing the command in the Tools menu) which you can open through the Tools menu. There you see the result of the command as well, if any. You can also assign a shortcut to the command which can be ran just by using the keyboard - you do this by just placing the cursor in the Shortcut column and just press the shortcut you want. If there is a result from the command the Commands window is shown with the result. You can include %%p or %%d in your command to get the full path or directory of your current document. This means that you don't have write the path of the document but you can e.g. compile the current document easily.

### Run text:

When you choose Run Text in the Tools menu the text is saved to a temporary file and then ran with the command chosen in Preferences, normally /bin/sh. Any result is displayed in the Commands window.

### AppleScript

Limited AppleScript support is included in Smultron. You can information and change the text in the current document. What is available can be seen in this example script:

    tell application "Smultron"
    	set theName to name as Unicode text
    	set thePath to path as Unicode text
    	if edited is false then
    		display dialog "No need to save"
    	end if
    	set theContent to content as Unicode text
    	set content to "This text will replace all text in the current document"
    end tell

### Live Find:

If you quickly want to find something you can use the Live Find toolbar item. Press Command-Option-F to place the cursor in the search field and write what you want to search for. If it can be found it will be selected and if you want to search for the next occurrence press Command-G.

### Smultron as an external editor:

Smultron has support for the ODB Editor Suite so any program that implements that protocol (e.g. FTP-programs) can use Smultron to edit its files.

### Auto-completion:

You can set in the Preferences whether Smultron should suggest the completed word automatically. Otherwise you can press F5 or Option-Esc to get the list. If you don't find a match in what's been suggested you can press Esc or just continue writing. (In 10.3 Panther you may need to write at least two characters before you're able to insert your chosen word by pressing Return or Tab.)

### Comment or uncomment Selection:

Inserts whatever the syntax definition has defined as single-line comment for the current document, e.g. // for a PHP-document, at the beginning of the line if the first line of the selection isn't already commented, otherwise it removes the comments. The menu item is only available if the used syntax definition has a defined single-line comment.

### .Mac Sync:

With this feature you can always have the same snippets and commands if you work on different computers, you turn this feature on under .Mac in System Preferences. You can also sync the preferences in the application menu; it uploads the preferences to /Documents/Smultron Preferences on your iDisk and downloads it from there if you choose "Download Preferences from your iDisk" and sets the current preferences accordingly.

### Command-line utility:

Install it through the Help-menu (note that if you choose to install it directly you have to authenticate with an administrators username and password twice; once for the utility and once for its man page). With smultron (the name of the utility) you can start the application Smultron by just writing "smultron" in the Terminal with no options. If you write something after smultron it considers that to be the path to the file or, if you write more than one path, the paths to the files. You can use the standard wildcards e.g. * and ~ for your home folder. If you don't specify a full path it adds the current working directory to what you write. If it can't find any of the specified files, it first creates them and then opens them. (Note that if you use a wildcard and it can't match a file to that it creates a file including the wildcard character as a character in the path, e.g. if you write smultron ~/Desktop/*.jsp and there aren't any .jsp-files on the desktop it creates a file called *.jsp on the desktop.) For more information write "man smultron" in the Terminal.

### Services:

If you choose Services from "application"-menu you can make Smultron open the currently selected file, insert the selection into the current document or create a new document with the current selection. (Note that you need to log out and then log in at least once before this feature works.)

### Advanced Find:

Multi-document search and replace with the option to use regular expressions.

### Show Invisible Characters:

Shows a symbol for characters that are usually not seen, i.e. space, tab and new-line.

### Drag-and-drop of files into the documents list:

You can drag-and-drop one file or several files (or a folder) into the document list and Smultron opens them.

### Grab text to scroll:

If you press the option and command keys and drag with the mouse you scroll the text.

### Print settings:

When you choose Print... you can choose Smultron in the pop-up menu and choose which font to use. You can also choose if you want to print the header and if you only want to print the current selection. It is also possible to set the smallest margin you want to use and if you want to print the syntax colours.

### Open Hidden...:

With this you can see all the files even the ones that the system usually hides.

### Save A Copy As...:

Save a (backup) copy at a location without affecting your current file.

### Remove Needless Whitespace:

Removes any possible spaces or tabs after the text and before the line break.

### Entab & detab:

Replace tabs in the selected text with spaces or vice-versa.

### Shift left & right:

Remove tabs and spaces to shift to selected text to the left or insert tabs to move it to the right.

### You can navigate between different documents this way:

Press Command and Option and Up-Arrow to select the document above in the list, and Command and Option and Down-Arrow to select the one below.
You can also select the first ten documents in the list by pressing Command and a number from 1 to 0.

### Line numbers:

If you don't want to show the line numbers choose Hide Line Numbers in the toolbar or in the View-menu. Or you can set the Preferences to not show line numbers for new documents.

### Syntax colours:

If you don't want to show the syntax colours choose Hide Syntax Colours in the toolbar or in the View-menu. Or you can set the Preferences to not show syntax colours for new documents.

### Line wrap:

If you don't want the lines to wrap at the end of the window choose Don't Line Wrap in the toolbar or in the Text-menu. Or you can set the Preferences to not line wrap new documents.

### Status Bar:

If you don't want to show the Status Bar choose Hide Status Bar in the View-menu or if you just want to not show a particular information set the Preferences to your wish.

### Close Tag:

This tries to find the correct tag to close by calculating the number of tags that has been closed and opened (skipping tags like <br> and <hr />) so it will find the last tag that was opened but not closed. After it has found the correct one it insets the closing tag adding a / to the opening tag e.g. </head>. Note that this feature only works with tags surrounded by < and >.

### Prepare For XML:

This changes all occurrences of &, < and > in the selection into &amp;, &lt; and &gt; so that the text can be used in a XML-file.
Copyright (c) 2007 Peter Borg