Author Topic: Smultron: a free text editor for Mac OS X 10.4 Tiger a version for 10.3 Panther  (Read 5221 times)

0 Members and 1 Guest are viewing this topic.

Software Santa

  • Administrator
  • *****
  • Posts: 4268
Smultron: a free text editor for Mac OS X 10.4 Tiger a version for 10.3 Panther
UPDATE: Now for Leopard (10.5)

Smultron is a free text editor for Mac OS X 10.4 Tiger which is both easy to use and powerful. It is designed to not confuse newcomers nor disappoint advanced users. It has all the advantages of an Cocoa application and some of its features are tabs, line numbers, support for syntax colouring for many different languages, functions list, support for text encodings, snippets, a toolbar, a status bar, preview, split window, multi-document find and replace with regular expressions, possibility to show invisible characters, authenticated open and saves, command-line utility, full screen editing and running commands and scripts from within the application.

Created, designed and programmed by Peter Borg.


Split window:
You can choose to work with two different documents or two parts of the same document by splitting the window. By default it splits the window horizontally but by holding Option you split it vertically. 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/right part by choosing it in the lower part of the document.

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.

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

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

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).

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. And if you include a %%c the cursor will be placed at that position after the snippet has been inserted.

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 you can put as the base URL for all the images to load correctly (as long as you are connected to the internet of course).

You can run commands from within Smultron if you e.g. want to compile some code or make a file executable, or if you want e.g. to validate an HTML document or insert e.g. the current date. You can also assign a shortcut to the command which can be ran by just 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 it can be shown in the curent text if you have chosen it to be inline or otherwise in a separate window. 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. If you include %%s the selected text will be saved into a temporary file and %%s exchanged with the path to that file. You can also select some text and run that text as a command inline. E.g. if you write "date" (without the quotes) and select it and choose Run Selection Inline from the Tools menu it will be replaced by the current date.

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.

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 Tab to get to the text and then 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.

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.

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.

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. The regular expression engine is ICU. You can find more information about it here:

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. You can also drag documents between projects, but if you drag from a tab bar the destination must also be a tab bar and likewise if you drag from the document list you must drag to a document list.

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 in many ways:
Press command and option and up-arrow (or left-arrow) to select the document above in the list, and command and option and down-arrow (or right-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
) 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. 

Latest version (3.1.2)
    Requirements: Mac OS X 10.4.9 Tiger or later

Earlier versions:
    2.2.7 for Mac OS X 10.4.5
    1.2.7 for Mac OS X 10.3.9

Categories: Office - Productivity - Mac System X - Panther - Tiger - PPC - MacIntel
« Last Edit: December 07, 2008, 11:26:27 AM by Software Santa »


Welcome Visitor: