smultron handleiding

46
Smultron by Peter Borg tuppis.com/smultron

Upload: willem-de-graaf

Post on 06-Mar-2016

235 views

Category:

Documents


1 download

DESCRIPTION

een volledige pdf voor de bediening van smultron

TRANSCRIPT

Page 1: smultron handleiding

Smultronby Peter Borgtuppis.com/smultron

Page 2: smultron handleiding

1

IntroductionSmultron is a free text editor for Mac OS X Leopard 10.5 which is both easy to use and powerful. It is designed to neither confuse newcomers nor disappoint advanced users. It should work perfectly for a whole variety of needs; like web programming, script editing, making a to do list and so on.

Smultron has all open documents in a list with beautiful Quick Look icons to your left just like e.g. iTunes so you can easily switch between many documents - you can also choose to display them as tabs if you prefer it that way.

It is easy to program with Smultron as it colours the content in different colours depending on what the code does. And you also have many ways to search for words and line numbers to help finding the code you are looking for. You can also split the window in two to display two parts of the same document or to compare two different documents side by side.

You can also preview HTML-files directly in Smultron and save snippets of text and insert them simply with a shortcut. And if you don’t want to be disturbed by other applications or the desktop you can let Smultron cover the whole screen to let you concentrate on your work.

For the more advanced users Smultron can find all those system files that are normally hidden and it has authenticated open and saves for them. Smultron can also use regular expressions and it can run commands and scripts.

For all international users there is full support for all encodings and it is translated into many languages so you can use it in your own native tongue.

Page 3: smultron handleiding

2

Featuressplit windowYou 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 windowIf 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.

quick look icons listIn the document list on the left hand side Smultron uses the Quick Look icons so it possible to get a glance of the contents directly.

view in fu# screenYou 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.

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

Page 4: smultron handleiding

3

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

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

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

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

commandsYou 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 current 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

Page 5: smultron handleiding

4

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

appleScriptLimited AppleScript support is included in Smultron. You can retrieve some 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 findIf 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.

Page 6: smultron handleiding

5

smultron as an external editorSmultron 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-completionYou 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 selectionInserts 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 utilityInstall 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.

servicesIf 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

Page 7: smultron handleiding

6

current selection. (Note that you need to log out and then log in at least once before this feature works.)

advanced findMulti-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: http://www.icu-project.org/userguide/regexp.html

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

drag-and-drop of files into the documents listYou 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 scro#If you press the option and command keys and drag with the mouse you scroll the text.

print settingsWhen 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.

Page 8: smultron handleiding

7

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

remove needless whitespaceRemoves any possible spaces or tabs after the text and before the line break.

entab & detabReplace tabs in the selected text with spaces or vice-versa.

shi' le' & rightRemove tabs and spaces to shift to selected text to the left or insert tabs to move it to the right.

navigate between different documentsPress 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 numbersIf 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 coloursIf 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.

Page 9: smultron handleiding

8

line wrapIf 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 barIf 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 some particular information set the Preferences to your wish.

close tagThis 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 xmlThis changes all occurrences of &, < and > in the selection into &amp;, &lt; and &gt; so that the text can be used in a XML-file.

Page 10: smultron handleiding

9

PreferencesGeneral

create new documentWhether you want a new empty document or nothing at all when you start the program. This option has no effect if you start with a file e.g. by double clicking on a file.

check for updatesIf you are connected to the internet Smultron will check to see if you are using the latest version of Smultron, and if you aren't you get the option of downloading it. Or you could use the button to check manually.

syntax colourWhether new documents should by default get syntax colours according to the settings in the Syntax Colouring tab.

line wrapWhether new documents should wrap the lines by default so you can see the whole line even if it is long.

show invisible charactersWhether to show invisible characters as default for new documents.

spe# check as you typeTurns on spell checking automatically.

Page 11: smultron handleiding

10

show line gutter for new documentsWhether to show the line numbers field for new documents. The width is in pixels and the line numbers field automatically resizes if it is too small. Set the width to no less than 20 and there really should be no need to have it larger than 50 but you can if you want to.

show matching bracesWhen you write a ), } or ] Smultron briefly highlights the corresponding (, { or [ if it can find it, otherwise it beeps.

indent new lines the same as the line aboveAfter you press Enter places the cursor on the new line where text starts on the preceding line.

treat { and } inte#igentlyIndents one step on the next line if the last character on the preceding line is a { and shifts the characters on the line to the left when inserting a } if there are no letters before.

su+est automatica#y, a'er delayWhether the list of matching word-completions should appear automatically and how long (in seconds) after the last pressed key that the list of matching words should appear.

include standard wordsWhether the word common English words should also be included in the auto-completion instead of just the words from current syntax definition.

number of items in recent menuHow many past files to display in the File menu under Recent Items.

Page 12: smultron handleiding

11

Appearance

text fontSet the font and size for the text of the document and also for its line numbers.

text colourSet the colour of the text of the document.

background colourSet the colour of the background of the document but not for its line numbers.

tab widthThis sets how wide a tab should be; it calculates the width by checking the width of the number of spaces you state here in the current font.

indent widthThis sets how wide an indent should be; it calculates the width by checking the width of the number of spaces you state here in the current font.

show fu# path of documentIf you want the full path of the document to appear in the documents list.

size of textSet the size of the system font to either 11 or 13 where the open documents are listed.

Page 13: smultron handleiding

12

show fu# path in window titleIf you want to display the full path to the current document e.g. “CocoaIsWonderful.html - /Users/steve/Desktop” instead of just “CocoaIsWonderful.html” in the title of the window.

show page guide, at columnIf you want to display a faint line after e.g. 80 characters. This only works correctly when you use a monospaced font.

status bar: last saved, in formatThe date and time of the last time the document was saved and the format it should be displayed in. See Expert Preferences for instructions on how to change the format yourself.

status bar: length of documentThe number of characters in the document

status bar: length of selectionThe number of characters in the current selection, if less than two characters are selected this won't show in the status bar

status bar: positionShows first the location of the cursor in the line and then the location of the cursor in the whole document.

status bar: text encodingShow which encoding the current document has; you can change it through Text Encoding in the Text-menu and also set the Preference as you like in the Open & Save tab.

Page 14: smultron handleiding

13

status bar: syntax definitionShow which syntax definition is set for this document; you can change it through Syntax Definition in the View-menu and also set the Preference as you like in the Syntax Colouring tab.

Open & Save

0penWhether when you choose Open to start at the folder where you last opened a document from, or start at the same folder as the current document or whether to always start at a particular folder.

save asSame as for Open but for when you choose Save As...

open a# documents I had open when I last quitThis saves a list of all the documents (except for new documents that has never been saved) that are open (and not in a saved project) when Smultron is closed and opens them automatically the next time Smultron starts. If there are documents in more than one unsaved project all those are collected into one project the next time Smultron starts.

assign document to smultronWhen a Mac OS X application saves a file it sometimes sets the Creator and Type of the document so that whenever you double-click on that document it starts with that particular application. If you choose this option Smultron will change that information so that the document will always be opened by Smultron. New documents are always saved so that they are opened by Smultron.

append name in "save as", withIf you e.g. always want to add the extension .txt to all filenames, check this box and Smultron will automatically append that to the name when the "Save As" sheet comes up.

Page 15: smultron handleiding

14

line endings (when saving)Different operating systems uses different invisible characters to denote that you want a new line. This option gets you to choose to which line ending you want when you save your document. If you don't have a particular need you can usually set it to “Leave unchanged” which leaves the line endings as it is for documents that you have opened. New documents uses the Unix standard.

Advanced - Syntax Colours

active - colourHere you can turn on syntax colouring for each part and decide which colour Smultron should use. See Syntax Colouring for a description of what the different parts are.

only colour ti# the end of the line if it can't find closing tagOnly continue to colour till the end of the line instead of the rest of the document if just the start tag is found and not the closing tag in e.g. a multiline comment

colour multi-line stringsColour a string even if it has line-breaks in it.

Advanced - Syntax Definitions

use definitionHere you choose whether the Smultron should guess from the extension which syntax definition to use (e.g. if the extension of the document is .html it will use HTML) or if it should always use a particular syntax definition). If the document does not have an extension it tries to guess by checking the first line of the document for e.g. #!/usr/bin/perl and then maps it to the syntax definition; if it can't guess, it will use the Standard one.

Page 16: smultron handleiding

15

the tableThe table lists all the extensions that are mapped to each language. If you add or change an extension just double-click in the Extensions-column and change the extension (the extensions are space separated and there should be no dots). Smultron uses the first language (alphabetically) that has the extension so if many languages share the same extension make sure that no language above also has the extension.

Advanced - EncodingsChoose whether to always use a particular text encoding when you open a file or whether to guess the encoding of the document. Smultron guesses by trying to see if any information about the encoding is saved along with the file otherwise it checks for “charset=” or if it can't find that, search for “encoding=” and map the encoding to what follows after that. If it can't find the encoding this way it checks for either EFBBBF, FEFF or FFFE at the beginning of the file and, if found, set the encoding to UTF-8 or UTF-16. If it can't guess by any of these means it sets it to the chosen encoding. In Leopard Smultron checks to see if the document has been saved with a particular encoding (it is saved as a piece of meta-data) and, if so, it always uses that one.

Advanced - Really Advanced

indent with spaces, not tabsWrites spaces and not a tab when the tab key is pressed. How many spaces are determined by Tab width in Appearance.

tab stopsWhether you want to use tab stops or not, i.e. if it should calculate how many spaces are needed to get to the next stop, which is defined by "Tab Width", instead it will insert a fixed number of spaces when pressing tab (if one has chosen to insert spaces instead of a tab when indenting).

enable smart insert and deleteWith this option Smultron can keep track of spaces when you cut, copy and space so that you never get e.g. two spaces before a word.

Page 17: smultron handleiding

16

check if document has been updated by another applicationIf another application opens the current document and saves it so that the document you opened is not the same as it is now you get the choice with this option if you want to update your document or whether to ignore the changes made to the saved document.

use rgb rather than hex when inserting colour valuesWhen choosing a colour with Insert Colour... in the Action menu you can insert the colour value like this rgb(255,255,255) rather than like this #FFFFFF.

auto-insert a closing )Automatically inserts a ) when you write a (.

auto-insert a closing }Automatically inserts a } when you write a {.

highlight current lineChanges the background colour of the current line so it is more easily seen.

colour for invisible characters when shownThe colour that the usually invisible characters have when they are shown.

opening: if I choose to open a folder, open a# files within itOpens all files within the chosen folder.

opening: recursivelyWhether to open files in subfolders as well.

Page 18: smultron handleiding

17

opening: filter out documents with these extensionsIf you e.g. open a folder with some images you can filter out those extensions here so those images will not be opened.

preview parserWhen the preview is shown this setting decides what is used to interpret the code into the seen preview.

run textWhen you choose Run Text in the Action menu the text is saved to a temporary file and then ran with this command.

Page 19: smultron handleiding

18

Expert PreferencesTurn off Smultron and run these commands in Terminal (which you can find in /Applications/Utilities) and then start Smultron again.

date formatYou can change the last date format in the list under Appearance, you do it by writing:

defaults write org.smultron.Smultron UserDateFormat "mmmm"The formats that you can insert instead of mmmm can be found here: http://icu.sourceforge.net/userguide/formatDateTime.html

update documents automatica#y without warningBy writing:

defaults write org.smultron.Smultron UpdateDocumentAutomaticallyWithoutWarning -bool YESdocuments are reloaded automatically without a confirmation dialogue when setting Smultron to check if another application has updated the document. Exchange YES with NO if you want to turn off this feature again.

time between document update checksBy writing:

defaults write org.smultron.Smultron TimeBetweenDocumentUpdateChecks 10you check if another application has updated any of the open documents every 10 seconds instead of the default 15 seconds. You can give it a value down to 1 second.

end file with line feedBy writing:

defaults write org.smultron.Smultron AlwaysEndFileWithLineFeed -bool YES

Page 20: smultron handleiding

19

Smultron will check to see if the document ends with a line feed character (\n) and if not, it will add one. Exchange YES with NO if you want to return to the default state.

suppress replace warningBy writing:

defaults write org.smultron.Smultron SuppressReplaceWarning -bool YES

Smultron will not ask if you really want to change all occurrences in Advanced Find but just change them directly. Exchange YES with NO if you want to return to the default state.

delay before preview should update live automatica#yBy writing:

defaults write org.smultron.Smultron LiveUpdatePreviewDelay 5you will change how long the delay will be after the last key is pressed before the preview should automatically update if you have checked the "live Update" box. Default value is 1.

quotes around directory when using %%dBy writing:

defaults write org.smultron.Smultron PutQuotesAroundDirectory -bool NOSmultron won't put quotes around the path to the directory referenced by %%d. Exchange NO with YES if you want to return to the default state.

where focus should be when selecting results in Advanced FindBy writing:

defaults write org.smultron.Smultron FocusOnTextInAdvancedFind -bool YES

Smultron will change the focus when you click on a result in Advanced Find to the text so that you can directly change it. Exchange YES with NO if you want to return to the default state so that Smultron will keep the focus in the result list so that you can e.g. swtich between results with arrow-up and down keys.

Page 21: smultron handleiding

20

keep empty window openBy writing:

defaults write org.smultron.Smultron KeepEmptyWindowOpen -bool YESSmultron will keep the project window open after the last document within has been closed. Exchange YES with NO if you want to return to the default state.

grammar checkBy writing:

defaults write org.smultron.Smultron AutoGrammarCheck -bool YESSmultron will automatically check the grammar. Exchange YES with NO if you want to return to the default state.

automatic quote substitutionBy writing:

defaults write org.smultron.Smultron AutomaticQuoteSubstitution -bool YESSmultron will automatically substitute quotes from e.g. an inch character to a "proper" quote. Exchange YES with NO if you want to return to the default state.

automatica#y detect linksBy writing:

defaults write org.smultron.Smultron AutomaticLinkDetection -bool NO

Smultron will not automatically detect links to e.g. web sites in the text and make them clickable. Exchange NO with YES if you want to return to the default state.

quicklook iconsBy writing:

defaults write org.smultron.Smultron UseQuickLookIcon -bool NOSmultron will use the standard icon and not the Quick Look icon in the document list. Exchange NO with YES if you want to return to the default state.

Page 22: smultron handleiding

21

updating iconsBy writing:

defaults write org.smultron.Smultron UpdateIconForEverySave -bool NOSmultron will not update the icon every time you save and you will save resources but won’t be able to see updates to the icon. Exchange NO with YES if you want to return to the default state.

Page 23: smultron handleiding

22

Syntax ColouringSmultron syntax colours your document if you have chosen so with the syntax definition of your choice.

the coloursThe easiest way to learn which colours to choose in Preferences is to test on a document which you know well. But here to the right is an image of a php-code example which might help you.

“<?php” and everything in grey until the closing tag (not shown here) are Instructions. “<head><title>” are Commands. “echo” is a keyword.

change a syntax definitionThe syntax definitions are defined in plist files in the Application bundle (ctrl-click on Smultron and choose Show Package Contents -> Contents -> Resources) e.g. html.plist for HTML documents. If you want to change anything or add a keyword you can just change the file and save it. (Remember to treat special characters in the standard xml-way e.g. &lt; instead of < and if you don't want leave a string empty please do it like this <string></string>.)

The keys are: (I use php as an example within parentheses):

beginCommand(<) to show html commands

endCommand

(>)

beginInstruction(<?) to start a block of code

endInstruction

(?>)

Page 24: smultron handleiding

23

beginVariable

($) the character (or any of the characters) that signals that it is a variable

endVariable(:;(){}=[]+-/.,*!?%&><\) anyone of these characters ends the variable name

firstString(") only one character is recognised for the strings

secondString(')

firstSingleLineComment

(//) a comment till the end of the line

secondSingleLineComment(#) another comment till the end of the line

beginFirstMultiLineComment(/*) the start of a multiline comment

endFirstMultiLineComment(*/)

beginSecondMultiLineComment

(<!--) to allow e.g. html comments in php-code

endSecondMultiLineComment(-->)

keywordsCaseSensitive(<false/>) set either to </false> or </true> if you want the keywords to be case sensitive

recolourKeywordIfAlreadyColoured(<false/>) if you want a keyword to be coloured as a keyword even if its already been coloured as a command

keywords(<string>and</string>) a list of keywords

autocompleteWords(<string>auto-complete this word</string>) a list of words to add to the auto-completion

functionDefinition

Page 25: smultron handleiding

24

(<string>a regular expression</string>) a regular expression that finds the beginnings of functions in the document

removeFromFunction(<string>a string</string>) a string that is removed from the function name, e.g. if the function is defined by having the word function in front of it, it can be removed from the list to make it easier to read

attributes

you cannot define this yourself but it defined as the word before a “=” in a command

optional valuesYou can also add any of four optional strings which adds or removes characters from the character sets that decide where a keyword can start or end. The four keys are:

excludeFromKeywordStartCharacterSet

excludeFromKeywordEndCharacterSet

includeInKeywordStartCharacterSet

includeInKeywordEndCharacterSetjust add all characters you want, to the string to these keys.

add new definitionIf you want to add a new definition, you must create a new file named languagename.plist and fill it with information as per above (it is easiest to copy an a plist file and only change what you need). Then you add a (or open the existing) SyntaxDefinitions.plist file in the /Users/<your home folder>/Library/Application Support/Smultron folder and add a dictionary into the file. The best way to do this is to make a copy of the SyntaxDefinitions.plist that's in the application bundle and start from that one. An example is below:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<array>

<dict>

<key>name</key>

Page 26: smultron handleiding

25

<string>PHP</string>

<key>file</key>

<string>php</string>

<key>extensions</key>

<string>php php3 phtml phtm</string>

</dict>

</array>

</plist>

The name-key is what shows up in the View menu and the file-key is what you name your file minus the .plist extension. The extensions-key lists the various extensions your language can have, space separated and without dots.

Page 27: smultron handleiding

26

FAQwhat is smultron?Smultron is a text editor which is both easy to use and powerful and it is written in Cocoa for Mac OS X.

requirements?Mac OS X Leopard 10.5 or later

the name?Smultron is the Swedish name for wild strawberry and I thought it sounds kind of nice. Plus I didn't have to think about the icon for the application.

why you've written it?I've always thought that there has been a need for an easy, free text editor which won't confuse newcomers nor disappoint advanced users.

does it work with my 'p-program?Yes. You can usually decide which program should be an external editor in the FTP-programs and if you choose Smultron and then choose to open the file in the external editor it opens in Smultron, and then when you save the file in Smultron it is automatically uploaded to the FTP-site.

how to delete snippets, commands etc.?Select it and press Backspace or Delete on the keyboard.

Page 28: smultron handleiding

27

how to see the current function?Either in the Info window or, if you choose the Functions menu (in Tools) or the toolbar icon the current function is marked.

how to see the a# spotlight information in the Info window?Place the cursor in the information and just go down or right with the cursor keys and the text field will scroll to show all information.

where are things saved?Snippets, Commands and Projects are saved in <your home folder>/Library/Application Support/Smultron/Smultron3.smultron. Preferences and open files are saved in <your home folder>/Library/Preferences/org.smultron.Smultron.plist.

how to uninsta# it?Drag Smultron.app to the trash, and you can find the preference file at <your home folder>/Library/Preferences/org.smultron.Smultron.plist. If you've installed the command-line utility you can find "smultron" in /usr/bin and its man file "smultron.1" in /usr/share/man/man1. You also need to remove the file <your home folder>/Library/Application Support/Smultron/Smultron3.smultron.

how to translate smultron into my own languageYou need first of all to install the Developer Tools. Then download the source code from the site. Choose English.lproj from the folder and copy it onto the desktop. Rename it to your language (the easiest way to know exactly what name it should have is to look inside another application that you know already has support for your language).

Then open the Localizable.strings and Localizable3.strings in a text editor (and make sure that it opens with text encoding Unicode UTF-16) and translate the right side of every string (you'll see things like %2$@ and you need to keep them in the string as that is the code to insert e.g. a filename). Then open all .xib files in Interface Builder and translate all text to your language and make the necessary adjustments.

You don't need to translate SMLProject.xib, SMLSingleDocument.xib, SMLPreferences.xib, SMLCommandResult.xib, InfoPlist.strings or Smultron Help.

Page 29: smultron handleiding

28

Try to keep the width of the preferences windows 600 pixels (as it looks much nicer when the views are changed when running the application) or if you need to have it wider, make the four preferences nibs the same width. You can send the finished translation to me (the email address can be found in About Smultron) and I'll include it with the next release.

where is the code?http://tuppis.com/smultron

where is the latest version of smultron?http://tuppis.com/smultron

Page 30: smultron handleiding

29

TroubleshootingFirst make sure that you are running the latest version. Go to http://tuppis.com/smultron and check to see if you have the latest version. Then you can check to see if you have any Input Managers installed. Check the following directories:

• /Library/Application Support/SIMBL/Plugins/

• Library/InputManagers

• <your home folder>/Library/InputManagers

and try to disable any there and restart Smultron and see if the problem persists.

If that doesn't help you can try to move aside (e.g. move temporarily to the desktop) the Smultron preference file so every setting will be reset to the default:

• <your home folder>/Library/Preferences/org.smultron.Smultron.plist

and the data file:

• <your home folder>/Library/Application Support/Smultron/Smultron3.smultron.

If nothing works you can try to download a fresh version of Smultron from http://tuppis.com/smultron to make sure that the application hasn't been damaged in any way.

You can also check to see if it's a known bug at http://sourceforge.net/tracker/?group_id=110857&atid=657592 and if I'm working on a fix. And, if not, you can email me (the address is in About Smultron) or you can file a new bug at that page.

Page 31: smultron handleiding

30

Thanks to…localisationsSwedish Peter Borg

Czech Tomas Kolar

Finnish Matti Olkinuora

Hungarian Daniel Fülep & Balázs Koren

Spanish Hector A. Llera

Italian Daniele Bufarini

French Antoine Desir

German John Feiner & Andre Trecksel

Dutch Berend Hasselman

Chinese (Simplified) Oranje Yee

Japanese Muneo Takemoto & Nagisa Siowatari

Chinese (Traditional) Wong Ho Wang

Greek George Hatzigeorgakidis

codeHelp with tabs from Positive Spin Media

Help with regular expressions from IBM & CocoaICU

Page 32: smultron handleiding

31

History3.5.1Added Catalan and Korean localisations

Added syntax definitions for Cobol, Csound, Erlang, GEDCOM, JavaFX, MEL, NEURON and SuperCollider

Improved the preview when printing

Some other small fixes

3.5Fixed an issue with the Italian localisation

Fixed an issue with the complete-menu

Added ASM-MIPS syntax definition

New toolbar icons

Some other small fixes

3.4Added Greek localisation

Faster

Reduced memory usage

Added MySQL syntax definition

Added Metaslang syntax definition

Added VHDL syntax definition

Various other small improvements

Various bug fixes

Page 33: smultron handleiding

32

3.3Updated appearance

Now uses Quick Look instead of standard icon in documents list

More animation

Some small improvements

Some bug fixes

3.2.1Added Ox syntax definition

Some bug fixes

3.2Only for Leopard

Added Chinese (Traditional) localisation

Added IDL syntax definition

Added Logtalk syntax definition

Added Udo syntax definition

Some other improvements

Some bug fixes

3.1.2Added Scala syntax definition

Some other small changes

3.1.1Added Chinese (Simplified) localisation

Added Japanese localisation

Page 34: smultron handleiding

33

Added Verilog syntax definition

Added "hidden" preference to keep project window open after last document is closed

Fixed possible issue when using multiple single document windows

Some other small improvements

Some small bug fixes

3.1Changed default encoding to Unicode (UTF-8)

Added way to automatically open previously opened documents/projects

Added Dutch localisation

Added ASM-x86 syntax definition

Fixed an issue when changing font size with the keyboard

Fixed a possible issue with the Spotlight importer

Made a small improvement when working as an external editor

Some other small improvements

Some small bug fixes

3.0.7Added convenient way to change font size (Command Plus and Minus)

Fixed an issue when opening a saved project

Fixed a possible issue with Advanced Find

Fixed an issue with Services

Fixed an issue with setting shortcuts for commands

Fixed an issue with the colouring of CSS

Improved the German localisation

Some other small improvements

Page 35: smultron handleiding

34

3.0.6Fixed a couple of possible crashes

A couple of minor improvements

3.0.5Added Italian localisation

Added French localisation

Added German localisation

Added eZ Publish syntax definitions

Improved the collaboration when working as an external editor

Fixed a couple of possible issues with Advanced Find

Some other improvements

Some other bug fixes

3.0.4Fixed a couple of possible crashes

Fixed a possible problem when working as external editor

Improved the highlighting of the current line

A few other small improvements

3.0.3Added Hungarian localisation

Added Spanish localisation

Fixed possible issue when working as external editor

Fixed possible problem with regular expressions and replace

Fixed an issue when saving projects

Fixed bug when checking for updates

Page 36: smultron handleiding

35

Various other small fixes and improvements

3.0.2Added Czech localisation

Added Finnish localisation

Fixed possible problem with showing the wrong syntax colours

Fixed problem with sometimes not showing Advanced in Preferences

Fixed possible crash when opening a document with authentication

Various other small improvements

3.0.1Fixed some possible crashes

3.0Handling of projects is much improved

Running of commands is much improved

Updated apperance

New icons

Reduced memory usage

Improved and faster syntax colouring

Improved printing speed

Added vertical split (hold option)

Added FreeFem++ syntax definition

Bug fixes galore

Many, many other improvements

Page 37: smultron handleiding

36

2.2.7Added Serbian (Latin) localisation

Added AMPL and TorqueScript syntax definitions

2.2.6Added syntax definitions for Lisp, Lilypond, MetaPost and LSL

Fixed a possible problem with large Markdown files

Updated Finnish localisation

Reduced memory usage under certain circumstances

Some small improvements

Some bugfixes

2.2.5Added Chinese (Simplified) localisation

2.2.4Can now preview Markdown (see Hidden Preferences)

Some new icons

Some small improvements to Shift Left and Right

Some other small improvements

Some small bugfixes

2.2.3Fixed possible problem with Shift Left

Added possibility to have separate indent and tab widths (see Hidden Preferences)

Changed shortcut of Shift Left and Right to standard (Command-[ and ])

Page 38: smultron handleiding

37

2.2.1Added Korean localisation

Added Nemerle syntax definition

Now uses tab stops per default when using spaces instead of tabs for indenting

Can now make sure file ends with line feed (\n), see Hidden Preferences

Updated Czech and French localisations

Some other improvements

Assorted bugfixes

2.2Added option to have black and white toolbar icons (see FAQ)

Readded line wrap toolbar icon

Some small bugfixes

2.1.5Added Czech localisation

"Close Tag" now recognises self-closing tags

Readded "Split Window" toolbar icon

Assorted improvements

Assorted bugfixes

2.1.4Added syntax definition for RHTML

Fixed a possible temporary hang at startup

Some improvements to the syntax colouring

A few other small improvements

Some small bugfixes

Page 39: smultron handleiding

38

2.1.3Fixed a possible crash

Assorted improvements

Assorted bugfixes

2.1.2Fixed possible crash at startup

2.1.1Fixed a memory leak

Some other small fixes

2.1Added Italian localisation

Added Finnish localisation

Added syntax definition for Active4D

Added a way to unregister the sync schema (see FAQ)

New icons

Assorted improvements

Assorted bugfixes

2.0.4New toolbar icons

Added syntax definition for R

Various other small improvements

Some small bugfixes

Page 40: smultron handleiding

39

2.0.3Added German localisation

Added Chinese (Traditional) localisation

Added French localisation

Improved the handling of projects

Various other small improvements

Some small bugfixes

2.0.2Now the window doesn't reappear after hiding under certain settings

Now Open Hidden... works

Improved the Live Find

Improved the count of documents in projects

Fixed a rare crash which could occur when importing and exporting snippets

Some other small improvements

2.0.1Snippets can now be inserted from contextual menu

Now indicates if a document is edited in the tab bar

Fixed a bug when manually changing syntax definition

Improved the automatic indentation

Some other small bugfixes and improvements

2.0Split view

View document in separate window

Tabs

Page 41: smultron handleiding

40

Functions list

Run commands

Info window

Improved projects handling

Full screen editing

.Mac synchronization of snippets and commands

Improved syntax colouring

Print syntax colours

Resolution-independent graphics

Page guide

Now works with multiple selections

Slightly more AppleScript support

Many, many other improvements

1.2.7Some small improvements

Some small fixes

Added Dylan syntax definition

1.2.6Some small fixes

Updated the appearance

Prepared it for x86

Added Russian localisation

Added Spotlight importer

Added Apache syntax definition

1.2.5

Fixed an issue when working as an external editor

Page 42: smultron handleiding

41

1.2.4

Fixed an issue with auto-complete

1.2.3

Added Spanish localisation

Improved the syntax colouring

Fixed an issue where you sometimes would have to authenticate unnecessarily when saving

Fixed an issue where the unsaved-document sheet could be closed without choosing an option

Some other small improvements

1.2.2Fixed a few small bugs

1.2.1Fixed some issues with the syntax colouring

1.2Better syntax colouring

Faster syntax colouring

Much faster opening of large documents

Some other speed improvements

Command line utility can now open several files and it understands standard wildcards

Added Czech localisation

1.1.2Fixed an issue with diacritical characters

Added Simplified Chinese localisation

Page 43: smultron handleiding

42

1.1.1Fixed an issue when functioning as an external editor

Fixed an issue with the Haskell and Matlab syntax definitions

Some other small improvements

1.1Implemented the ODB Editor Suite so Smultron can be used as an external editor by e.g. FTP-programs

Added auto-completion

Added a Save All menu item

Added a menu item to either Comment or Uncomment the selection

Implemented a standard Open Hidden... dialogue

Added a Preview toolbar icon

Added word count in the status bar

Can now rearrange the order of the documents

Tab-key now shifts text right when text is selected instead of replacing it with a tab

Code Snippets are now added to the previous when imported and will not replace the previous

Added Haskell and Matlab syntax definitions

Made adding your own syntax definition simpler

Many other improvements

Fixed a few small bugs

1.0.2Added localisations (Italian and Chinese - Traditional)

Fixed a few small bugs

Added Lua syntax definition

Page 44: smultron handleiding

43

1.0.1Added Japanese localisation

Improved the syntax colouring

Fixed a couple of bugs

Added Stata syntax definition

1.0Added localisations (Swedish, French and German)

.Mac synchronisation of the preferences

Added a Open Recent Project-menu

Added option to automatically open all documents that were open the last time Smultron was closed

Improved the syntax colouring

One can now replace with an empty string in Advanced Find, i.e. delete

Added option to colour multi-line strings

Now sets the insertion point to the same colour as the text

Now guesses the syntax definition from the contents of the first line if there isn't an extension

Added syntax definitions (PDF, LaTex and Objective Caml)

Many other improvements and some bugfixes

0.8Added possibility to use authentication when saving and opening files

Added a command-line utility (install it from the Help-menu)

Added Services (Insert Selection into Current Document, New Document Containing Selection, Open Selected File)

Added command to save all open documents as a project to be able to open all of them in one step

New icons, by Gaëtan Ark

Page 45: smultron handleiding

44

One can now remove "Quickly Find Next..." from the toolbar

Added option so Smultron opens all documents within a folder, instead of giving a warning

Added option to set colour of invisible characters (when shown)

Fixed an issue where under certain circumstances the current document would be closed instead of the Find-window

Fixed a bug which under certain circumstances could delete the wrong character

0.7Added multi-document find and replace with regular expressions

Added possibility to show invisible characters

Can now drag-and-drop files into the documents list

Can now choose a different font for printing, and can also choose to print header, only selection and to set margins.

Added option to show position in status bar

Can now find hidden files and open them

Added option to indent with spaces instead of tabs

Can now choose an encoding in Open... sheet

Can now scroll the text by grabbing it with the option key and mouse

Can now choose to Save A Copy As...

Now updates the window properly when it is resized with no open documents

A few small fixes with the syntax colouring

ActionScript syntax added

0.6.1Added settings for tab width.

Added an option to make Smultron immediately recolour the whole visible page after every pressed key. This makes it slightly slower but it removes the flickering that otherwise can occur in languages like PHP and JSP.

Page 46: smultron handleiding

45

Added a Close Tag-command that will in a somewhat intelligent way close your tag. It will try to find the right tag to close and skip those that don't need closing like e.g. <br>.

If it is set to guess encoding and it can't find an explicitly stated encoding, it now checks for either EFBBBF, FEFF or FFFE at the start of the file and, if found, sets the encoding to UTF-8 or UTF-16.

Now updates the status of the document after a Revert.

Fixed two small bugs with the display of find-results in the drawer.

Fixed so that Smultron can open documents of all Types with drag-and-drop.

Now in Quickly Find Next... after a failed search, Smultron sets the focus back to the document so that it receives the next pressed key.

Adjusted the wording of the alert-sheet that is presented if another application has updated the document, and made sure that its checks are performed when they should occur.

Corrected the icons in Help.

Fixed so that all preferences are remembered properly.

0.6First official release