Smultron Smultron

An elegant and powerful text editor that is easy to use.

Smultron is a great text editor

Use Smultron 6 to create and edit any text document - everything from a web page, a script, a list, to every kind of text or code.

  • It is very easy to begin with Smultron 6 as it is designed to be intuitive to use
  • Edit your text with many helpful tools
  • All your open documents are easily accessible
  • Use Smultron 6 in your own language as it is translated into many languages
  • Store your documents in iCloud and access them on all your Macs
  • It has all the powerful features you want when you need them - like syntax colors for 100 code languages, regular expressions, commands, text snippets, text folding, line numbers and many more

Price & Download

Smultron 6 only costs US$ 5! You can get it in Mac App Store

Mac App Store
Smultron 6

The new Smultron 6 has many improvements and new features:

  • It is now possible to merge all open documents windows into one single window
  • Use different themes and change the syntax colors
  • iCloud sync for commands, text snippets and themes
  • Updated for OS X 10.9 Mavericks
  • Change the file extensions used for syntax definitions
  • Better and easier way to see and switch between open documents
  • Faster
  • New syntax definitions: Sass/SCSS, Groovy, Go, Make, YAML
  • Many improvements to other syntax definitions
  • Many other improvements and bug fixes from earlier versions
Requirements

Please note that Smultron 6 requires OS X 10.9 Mavericks.
For OS X 10.8 Mountain Lion you can get Smultron 5 instead.
For OS X 10.7 Lion you can get Smultron 4 instead.
For OS X 10.6 Snow Leopard you can get Smultron 3 instead.

Languages

Smultron is available in English, Chinese (Simplified), Danish, Dutch, Finnish, French, German, Italian, Japanese, Korean, Norwegian, Portuguese, Russian, Spanish and Swedish


Screens

Clean and intuitive UI
Merge all windows
A few features
Themes

FAQ
The name?

Smultron is the Swedish name for wild strawberry (fragaria vesca).

Full screen when using Merge All Windows?

The full screen mode is unfortunately not available right now when using the Merge All Windows feature.

Why can't I choose Merge All Windows?

If a document window uses the full screen mode then you can't choose Merge All Windows (or if you only have one document open). Change that window to not use the full screen and then you can choose it.

Can I change the file extension a particular syntax uses?

Yes, you can do that in Preferences - Advanced. Choose the syntax in the menu and then add or change the extension in the text field next to the menu (a space between each extension and no dots).

How do I assign a keyboard shortcut to snippets and commands?

You do this in System Preferences - Keyboard - Shortcuts. Choose App Shortcuts and then press + and then choose Smultron 6 and write the exact name of the snippet or command.

How do I change a keyboard shortcut?

You do this in System Preferences - Keyboard - Shortcuts. Choose App Shortcuts and then press + and then choose Smultron 6 and write the exact name of the menu item and choose a new shortcut.

Why does it insert an extra space when pasting some text?

That is a standard system feature which is there to help you with pasting text. But you can turn it off if you want in the Edit menu, under Substitutions just deselect Smart Copy/Paste.

Why does it replace some of the text I write with another character?

That is a standard system feature which is there to help you write those characters. But you can turn it off if you want in the Edit menu, under Substitutions just deselect Text Replacement. What exactly is replaced into what is decided by System Preferences - Keyboard - Text.

How do I change the colors for the text and background?

You do this by changing on of the themes in Preferences - Advanced and then you can easily change which theme you want to use in the View menu.

How do I delete snippets, commands etc.?

Select it and press Backspace on the keyboard.

How can I open "hidden" files?

When you are in the standard open dialog just press Command-Shift and a dot.

Where are things saved?

Settings and data for Smultron are saved in your preference files and that can be found here: <your home folder>/Library/Containers/com.peterborgapps.Smultron6/Data/Library/Preferences/com.peterborgapps.Smultron6.plist. You can see that folder in Finder by choosing Go to Folder in the Go menu and then write: ~/Library/Containers/com.peterborgapps.Smultron6/Data/Library/Preferences/

How do I change the language Smultron uses?

Generally the language used is determined by your system setting in System Preferences - Language & Region (see http://support.apple.com/kb/PH6467 for more information). But that setting applies to all apps and if you only want to change the language that Smultron uses to e.g. English you can do this by writing this command in Terminal:

defaults write com.peterborgapps.Smultron6 AppleLanguages '(en)'
Is there a command line utility?

Yes, there is a basic command for Smultron 6 which you have to download separately as it cannot be included in the Mac App Store release. You can download it from here.

Multiple and rectangular selection?

Yes, you can get multiple text selections in Smultron by holding the Command key when selecting (please note though that you can delete the selected text in multiple places but you can't edit or add text to it directly) and you can get rectangular selection by holding the Option key when selecting.

Syntax
Syntax support for...

ActionScript, Active4D, Ada, AMPL, Apache, Applescript, Assembler x86, Assembler MIPS, Assembler PPC, ASP - JavaScript, ASP - VB, ASP.NET - C#, ASP.NET - VB, AWK, Batch, C, C++, C#, Cobol, CoffeeScript, ColdFusion, Csound, CSS, CUDA, D, Dart, Diff, Dylan, Eiffel, Erlang, eZ Publish, F#, Fortran, FreeFem++, GEDCOM, GIFT, GNU Assembler, Go, Groovy, Haskell, Header, HTML, IDL, Java, JavaFX, JavaScript, JSON, JSP, LaTeX, Lilypond, Lisp, Logtalk, LSL, Lua, Make, Markdown, Matlab, MetaPost, MEL, Metaslang, Multi User Forth, MySQL, Nemerle, NEURON, Objective Caml, Objective-C, Ox, Pascal, PDF, Perl, PHP, Plist, PostScript, PowerShell, Prolog, Python, R/S-PLUS, RHTML, Ruby, Sass/SCSS, Scala, Scheme, Servoy JavaScript, SGML, Shell, SML, SQL, Stata, Stylus, SuperCollider, SVG, Tcl/Tk, TorqueScript, Udo, UnityScript, VB, Verilog, VHDL, XML, YAML

Some Features
iCloud

Smultron has full support for storing your documents in iCloud so that you can access them on all your computers. When you save a document you simply choose iCloud under Where to put a document in iCloud. And you can open documents from iCloud by choosing iCloud in the top left corner in the normal Open... dialog. You can also handle your iCloud documents in System Preferences - iCloud. Smultron also syncs the Commands, Snippets and Themes to other Macs you have connected to the same iCloud account.

Merge all windows

Smultron normally uses a single window for each opened document for flexibility. But if you want you can choose to merge all windows into one and change between the different documents within that window. You do that by choosing Merge All Windows in the Window menu. Please note that you can only choose that mode if no window is using a full screen and while in that mode you cannot make the window cover a full screen.

Syntax colors and themes

Smultron has syntax coloring support for 100 code languages. It automatically finds the correct syntax by looking at the file extension or the parts of the content to see if it that way can find what language the document is in (you can manually change it in the Text menu). If you want to turn off the colors you do it the View menu. If you want to change the colors you do it by changing one of the different themes in Preferences - Advanced (you can then change between the different themes in the View menu.

Text folding

If you temporarily don't want to see a part of the document you can select it and choose Fold unde rText Folding in the Text menu. This replaces the selected text with a symbol (but only on the screen, the document still has all your text) so that you can see more of the parts of the document that you are interested in right now. In the same menu you then choose to Unfold that text by placing the cursor next to the symbol.

Split window

If you want to see two different parts of the same document you can choose Split Window in the View menu. If you hold option you split the window horizontally.

View in full screen

You can edit the document in full screen (nothing else is visible, not even the menu bar, but you can show it by moving your mouse to the top of the screen) by choosing the command in the View menu. Smultron fills 80 per cent of the screen with your document.

Functions

You can see a list of all the functions in your document in the Tools menu or with the toolbar item (if you have chosen to display it by using Customize Toolbar in the View menu).

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

Close tag

This tries to find the correct tag to close by calculating the number of tags that has been closed and opened 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. Note that this feature only works with tags surrounded by < and >.

Preview

With this you can preview the content of the current document. Smultron opens the document in the app that has been chosen in the system (using Info in Finder) for that kind of document.

Commands

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. 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 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. With a sandboxed as Smultron 6 you cannot write to files which aren't open in Smultron 6 but you can write to a special temporary folder by using %%t, e.g. pipe output like this "> %%t/outputfile". 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 Current 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.

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.

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.

Advanced find

Multi-document search and replace with the option to use regular expressions. The regular expression engine is ICU.

Show invisible characters

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

Remove needless whitespace

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

Shift left & right

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

Path bar

If you want to see the whole path to the document you can show the path bar from the View menu. If it is a new document which hasn't been saved it shows the path to the root of the startup disk (/).

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.

Regular Expressions

In Advanced Find you can use regular expressions to find and to replace whatever you want. Regular expressions are very powerful but also quite complicated to use properly. Below is a short list of some expressions you can use when searching but for a complete list you can go to: http://userguide.icu-project.org/strings/regexp

^ Start of a string
$ End of a string
. Any character (except \n)
* 0 or more of previous expression
+ 1 or more of previous expression
? 0 or 1 of previous expression
\w Matches any word character
\W Matches any non-word character
\s Matches any white-space character
\S Matches any non-white-space character
\d Matches any decimal digit
\D Matches any nondigit
[abc] Matches any single character included in the set
[^abc] Matches any single character not in the set
[a-z] Contiguous character ranges
(a|b) a or b
ab{2} Matches two b characters
Release Notes
6.0.10
  • Some small improvements and bug fixes
6.0.9
  • Some accessibility improvements
  • Some other small improvements
  • Various bug fixes
6.0.8
  • Fixed an issue when changing the printing font
  • Fixed an issue with the line numbers
  • Fixed an issue with the path bar
  • Some other fixes
6.0.7
  • Some small bug fixes and improvements
6.0.6
  • Fixed a few issues when using Merge All Windows
6.0.5
  • Fixes and improvements
6.0.4
  • Added "%%t" as an option when creating commands which gets replaced by a path where temporary files can be written
  • Some small fixes
6.0.3
  • Some small fixes and improvements
6.0.2
  • Some small bug fixes
6.0.1
  • Can now drag and drop files to the Documents view to open them
  • Can now drag and drop text to the Documents view to open a new document with that text
  • Fixed an issue where a document could sometimes hide unexpectedly
  • Merge All Windows now works more reliably
  • Some other small fixes
6.0
  • Now possible to merge all open documents windows into one single window
  • Use different themes and change the syntax colors
  • iCloud sync for commands, text snippets and themes
  • Updated for OS X 10.9 Mavericks
  • Change the file extensions used for syntax definitions
  • Better and easier way to see and switch between open documents
  • Faster
  • New syntax definitions: Sass/SCSS, Groovy, Go, Make, YAML
  • Many improvements to other syntax definitions
  • Many other improvements and bug fixes from earlier versions
Preferences

Some preferences can be set in the Preferences window but others are either set automatically or set through e.g. the View menu. But there are a few other settings which some might want to set and they can be set in the Terminal app which can be found in /Applications/Utilities. Quit Smultron and then open Terminal and write the commands found below (please note that you need to be careful when writing the commands and you might need to delete the preference file and start from the beginning if you make a mistake).

Disable auto save

Whether Smultron should automatically save the documents or if you need to manually save them. Disabling this also disables Versions. The default is YES.

defaults write com.peterborgapps.Smultron6 AutoSave -bool NO
Show page guide at column number

If you want to display a thin line after e.g. 80 characters. This only works correctly when you use a monospaced font. You turn this on in the View menu but with this command you can change at which it should be shown. The default is 80.

defaults write com.peterborgapps.Smultron6 ShowPageGuideAtColumn -int 80
Spaces per tab

How many spaces a tab equals in e.g. converting spaces to tab. The default is 4.

defaults write com.peterborgapps.Smultron6 TabWidth -int 4
Include standard words in auto complete

Whether the word common English (or whatever language you are using) words should also be included in the auto-completion instead of just the words from current syntax definition. By default it includes them, turn them off by this command. The default is YES.

defaults write com.peterborgapps.Smultron6 AutocompleteIncludeStandardWords -bool NO
Suggest auto complete after delay

How long (in seconds) after the last pressed key that the list of matching words should appear.

defaults write com.peterborgapps.Smultron6 AutocompleteAfterDelay -float 0.5
Save UTF-8 with BOM

To write a UTF-8 document with BOM use this command. The default is NO.

defaults write com.peterborgapps.Smultron6 UTF8WithBOM -bool YES
Full screen size

To change how much of the screen that should be used when in full screen mode in per cent. The default is 80.

defaults write com.peterborgapps.Smultron6 FullScreenWidth -float 80
Run text

When you choose Run Text in the Tools menu the text is saved to a temporary file and then ran with this command. The default is "/bin/sh". If e.g. you want to run it with it the php command you use the following command:

defaults write com.peterborgapps.Smultron6 RunText -string "/usr/bin/php"
Show position in the status bar

If you want to show the position in the status bar, use this command:

defaults write com.peterborgapps.Smultron6 ShowPositionInStatusBar -bool YES
Documents window on top

If you always want the Documents window to be above all other windows then use this command:

defaults write com.peterborgapps.Smultron6 DocumentsWindowOnTop -bool YES
iCloud sync

If you want to turn off iCloud syncing for Commands, Snippets and Themes, but still sync documents, then use this command:

defaults write com.peterborgapps.Smultron6 SyncKeyValue -bool NO
Move windows when clicking on one in Documents

If you want to turn off that Smultron moves and changes the size of the document that you choose in Documents, then use this command:

defaults write com.peterborgapps.Smultron6 MoveWindowWhenSwitching -bool NO