News: January 2011

Sublime Text 2: New Version

January 29, 2011 by Jon Skinner

A new version of the Sublime Text 2 alpha, 20110129, is out now. This primarily addresses compatibility with Linux distributions other than Ubuntu, but I've snuck in some extra features for everyone:

  • OS X: Command+1 will select the first tab, Command+2 the second, and so on.
  • Various Goto Anything improvements, mostly notably, symbol browsing will start at the symbol closest to the cursor, and spaces are ignored when searching through files. Previously, a space would only match against a file name with a space in it.
  • Syntax highlighting for the Go programming language.
  • More!

The full list of changes is on the Sublime Text 2 page. Release announcements are generally posted on the forum, rather than the blog, so I'll be posting them there (and on twitter) after this release.

Sublime Text 2 FAQ

January 29, 2011 by Jon Skinner

There's been a fantastic response to the Sublime Text 2 alpha. A few questions have come up several times; answers are below.

How do I change the font?
Add these lines to Preferences/User File Preferences:

	"font_face": "Courier New",
	"font_size": 10

and then change as desired. The font will change when you save.

How do I open a directory as a project?
Drag the directory onto the sidebar, and it'll be added to the project. You'll then be able to browse using the sidebar, and search using Ctrl+P (Command+P on OS X)

How do I open files using the command line on OS X?
A command line tool will be coming in the future for OS X, in the mean time you can use this method, although you'll have to replace references to Sublime Text X with Sublime Text 2.

How do I reset Sublime Text 2 to a fresh state?
You'll need to exit Sublime Text 2, and then delete the data directory, which can be found at:

  • Windows: %APPDATA%/Sublime Text 2
  • OS X: ~/Library/Application Support/Sublime Text 2
  • Linux: ~/.Sublime Text 2

I'm having trouble running Sublime Text 2 on Linux
Ubuntu is the only supported distribution at the moment. I'm working to expand this as soon as possible.

Sublime Text 2: Public Alpha

January 28, 2011 by Jon Skinner

Sublime Text 2 is available now as a public alpha, for Windows, OS X, and Linux.

Sublime Text 2 started life as Sublime Text X, and was first available as a preview to registered users several months ago. Since then, there's been an average of one new release a week. It's come a long way, and it's time to open it to a wider audience.

Sublime Text 2 is currently at a late alpha stage. Primarily, this means there are still several features missing compared to Sublime Text 1. These include spell checking, bookmarks, distraction free editing, a full python API, and general UI polish. These features will be coming over the next few months.

Goto Anything

Sublime Text 2 has Goto Anything (Ctrl+P on Windows and Linux, Command+P on OS X) to quickly navigate between and within files:

  • Type part of a file name to open it. Files can be open files, recently closed files, or files in the project. The fuzzy matching is fast and intelligent, providing instant-as-you-type navigation on 50,000+ file projects.
  • Type an '@' character, and start browsing by symbol. Type '#' to search within the file, or ':' to go to a line number.
  • Combining these together, for example, "tp@rf" may take you to a function called "read_file" within a file named "text_parser.py". Similarly, 'tp:100' would take you to line 100 of the same file.

The Goto Anything panel previews where it will take you as you type, loading files asynchronously in the background. You can use this to quickly look up the definition of a function, pressing escape to go back.

The various within-file symbols operate on the current file if typed alone, for example, ":50" will take you to line 50 of the current file, and "@" will browse the symbols of the current file. There are key bindings to open the Goto Anything panel with these pre-filled, for example, Ctrl+R (Command+R on OS X) will go directly to the list of symbols in the current file.

Instant Project Switch

Projects in Sublime Text 2 capture the full contents of the workspace, including modified and unsaved files. You can switch between projects using similar fuzzy matching logic as the Goto Anything panel, and the switch is instant, with no save prompts - all your modifications will be restored next time the project is opened.

Multiple Selection

Sublime Text 2 has the same multiple selection functionality as Sublime Text 1, providing a simple way to make many edits.

For example, to make the same edit on multiple lines, split the selection into lines (Ctrl+Shift+L on Windows and Linux, Command+Shift+L on OS X), and start navigating the cursors and type. Your actions will occur simultaneously at each cursor.

To rename a variable within a function, position the cursor next to it, and press Select More (Ctrl+D on Windows and Linux, Command+D on OS X) several times to select all occurrences, and then start typing to rename them all.

To rename a variable everywhere, use the Find Panel and press the Find All button (or Alt+Enter), then start typing to edit every occurrence.

User Interface

Sublime Text 2 supports multi-pane editing (i.e., side by side editing and other layouts), multi-window editing, full screen editing, and a minimap to show you an overview of your files.

Sublime Text 2 also lets you choose how you switch between files. It has a modern tab implementation, including dragging tabs between windows. A side bar is available, for when you need to work with a large number of open files. Both the tabs and side bar can be shown or hidden individually.

The side bar allows you to browse files in your project without cluttering the list of open files. Click once to preview a file, without opening a tab. Start editing the file, or double click, and the file will be opened as normal in a tab.

Customizable

Sublime Text 2, like Sublime Text 1, allows you to extend the editor with Python plugins. It has a Python console (Ctrl+~) to work with them at run time.

Every key binding is customizable, as are the menus, themes, and per-file type settings.

Cross Platform

Sublime Text 2 is available on Windows, OS X, and Linux, in 32 and 64 bit versions, and one license covers all operating systems.

Download

Sublime Text 2 can be downloaded and evaluated for free. Give it a try, I think you'll like it.

For news about new versions, follow sublimehq on twitter.