Sublime Text 2 is a cross-platform code editor I only recently heard about, and I have to say I’m really impressed despite the beta label. You can download the full app without paying a penny and with no enforced time limit for your evaluation.
So I really think it’s worth taking a look at, in your search for the elusive best code editor ever.
Nifty FeaturesColumn Selection and MultiSelect Editing: A super-powered selection system lets you select an entire column of code using the option-click or middle mouse button by dragging out a rectangle. You can then edit multiple selections at the same time, which pretty much blew my mind. I can see myself having to train my brain to actually make use of this function on a regular basis, but it could be incredibly time saving once you get used to it.
AutoCompletion: like every good code editor, Sublime Text 2 will figure out what language you’re writing in and help you out by auto-completing function names. Unqiuely, Sublime Text will also autocomplete variables that you created earlier in the code, which eliminates a good number of bugs when users mistype variable names. Very nifty indeed, especially if you’re the type of coder who loves to create very descriptive and long variables.
Syntax highlight and high contrast display: Despite what some people think about high contrast text on a black background, it is actually a lot easier to read. I’ve been using it for about a week now with no headaches and getting a lot more programming done than usual. On a dark background – though there are other colour schemes to choose from – syntax highlighting really stands out and makes a lot more sense.
In-Editor Code Building: for a number of languages, the app will build and run the code without you having to drop out to the command line. This is fantastic for beginners who just want to jump in and get started, and it can even handle large projects for the pro user.
Minimap: This is a quick preview of your entire file in the sidebar, with a screen sized rectangle showing where you are now. It lets you jump around your code by sight incredibly quickly. The entire interface is fast, and simple.
Snippets: If you have a block of code you used regular, just create a snippet of it and assign a unique name. Type the name and hit tab to have the entire snippet pasted out for you. For example, typing “html” will auto expand to a basic HTML page structure, while “lorem” will give you a full paragraph of sample text:
ExtensionsWith a python based plugin system, core functionality can be extended greatly, and theres already a wide range of stuff out there. My favourite – an absolute time saving godsend for me – is the WordPress extension, which gives full autocomplete and function definitions with default values for WordPress PHP functions – something you usually have to look up in the codex.
It also adds a number of key code snippets, such as a complete post content template for you to customize.
I’d also suggest the Package Control extension, which let’s you easily download new packages and install them without using the console. Installation of Package Control is as simple as opening the console and pasting a block of text.
Summary:Although your evaluation period with full functionality has no enforced time limit, a full licence technically costs $59. There is a nag dialog every 10 saves or so, but otherwise it’s completely usable. Of course, I would absolutely encourage you to purchase a full license to support the developers if you love the app, but I’m sure they wouldn’t begrudge starving students, and there’s nothing to stop you using it indefinitely.
Have you used Sublime Text 2 yet? What do you think, or do you have a different favourite code editor? Are you more of a traditionalist Emacs kind of coder, a minimalist notepadder, or do you prefer a full blown IDE to develop in?