Sublime Text 2: Public Alpha

January 28, 2011 by Jon Skinner All Posts

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.