News for hackers. Stuff that matters.
Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by wbond on Wednesday August 31, 2011 @09:06AM (#2945341)
Jon (jskinner) has been doing a great job of continuous releases with a mix of new features and bug fixes. It is easily the best $60 I've ever spent on an editor or IDE.

If you haven’t tried Sublime Text 2 before, I recommend taking it for a whirl. Most developers I've shown it to really like it. Here are some reasons it won me over:

Multiple selections. Select a variable and then press Ctrl+d/Cmd+d a few times. Now type a new variable name. Or, select a few lines and press Ctrl+Shift+l/Cmd+Shift+l. You can now make batch edits to all lines

Goto Anything (Ctrl+p or Cmd+p). Start typing a filename. Type an @ and then start typing a function or method name. Hit escape instead of enter to return to where you were.

It also has a very nice Python API that makes writing plugins fun. http://www.sublimetext.com/docs/2/api_reference.html

There are so many other little things done right that you find once you start digging in.

Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by mtogo on Wednesday August 31, 2011 @12:21PM (#2946232)
Some more:

If you have indentation set to use spaces, you can hit tab and it will add 4 spaces, then hit backspace and it will delete all 4 spaces. Most text editors won't do that.

It matches parentheses and braces, but you can just ignore it. Type a '(' followed by a ')'. With every other graphical editor I've tried that has brace matching, you end up with '())'. With sublime, you end up with '()'.

Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by edanm on Wednesday August 31, 2011 @06:37PM (#2947909)
Fyi, the Eclipse does bracket matching as well. In fact, I think Sublime Text borrows the concept partially from Eclipse. [1]

Eclipse is slightly if I remember correctly, since it lets you skip all closed braces with a tab. That way, typing (([tab] gives you (())_ , where _ is the cursor. Very convenient.

[1] I don't remember the details, but I remember that I posted a few lines to the Sublime Text forum, that fixed part of the way bracket matching worked to make it more like Eclipse. This was later put into Sublime Text proper. This is what I love - Jon actually looks at the things people are doing, and puts the good stuff directly into ST.

Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by dlikhten on Wednesday August 31, 2011 @10:23AM (#2945628)
Couple of features I wish ST2 had:

1) Ability to rename files and tell that to git/any revision control while it does it.

2) Bundler integration to automatically add all bundles to the project so they can be searched on.

Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by kellishaver on Wednesday August 31, 2011 @11:20AM (#2945903)
I wish it had code folding, and I wish I could do a block cursor instead of the | (easier to see) but I don't think those are hugely popular requests.
Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by Groxx on Wednesday August 31, 2011 @12:16PM (#2946203)
Last I've seen, code folding has been requested from day 1. And I see requests / lamentations / mentions of it every time discussions about it crop up, without exception.

Personally, as shiny as the scroll-preview is, the fact that it doesn't show the structure of the entire document makes it almost worthless to me. As much as I hate visual studio, MetalScroll[1] was fantastic. You can see functions by shape, visually navigate the entire file at a glance (though I have good visual memory, so that may be easier for me), and it shows folds, breakpoints, changed lines, and selections. ST2 shows... about a screen in either direction.

[1] http://code.google.com/p/metalscroll/

Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by chrisrogers on Wednesday August 31, 2011 @01:51PM (#2946671)
I would like to second this sentiment. That feature has become a vital part of how I navigate code, especially for projects that I am looking at for the first time.

It's the only thing preventing me from using SublimeText 2.

Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by Androsynth on Wednesday August 31, 2011 @02:18PM (#2946814)
SublimeText's minimap is not as feature rich as metal scroll, but its pretty useful in general as a nav tool. I often find myself wishing Chrome had a scrollable minimap.
Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by T-R on Wednesday August 31, 2011 @01:52PM (#2946675)
The userecho page on Code Folding has a lot of votes, though there's some speculation that it'd be pretty difficult to do with the current implementation of the editor control.

http://sublimetext.userecho.com/topic/19281-syntax-code-fold...

Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by jjm on Wednesday August 31, 2011 @10:49AM (#2945745)
If you do #1, you might as well throw in more commands. I can see why the author might not want to cascade in to that just yet.
Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by sunchild on Wednesday August 31, 2011 @10:07AM (#2945563)
I've moved from TextMate to Sublime Text 2 over the past few weeks. The only thing I miss from TM is the ability to jump back to the last opened file with command-t.

Has anyone managed to hack their config to enable that feature? I understand there are some callbacks available that might help, but I haven't figured out how to put them into action.

Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by wbond on Wednesday August 31, 2011 @10:24AM (#2945632)
Ctrl+Tab and Ctrl+Shift+Tab navigate through the "stack" of recently opened views (files). Is this what you mean?
Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by lobster_johnson on Wednesday August 31, 2011 @02:05PM (#2946750)
That only cycles between currently open tabs, so that's not quite the same. The genius of TextMate's go-to-file pane was that before you started typing, it would list your recently closed files, so the go-to-file pane had two functions in one, both servicing the need to open something that is not currently open.
Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by wbond on Wednesday August 31, 2011 @03:03PM (#2947043)
That sounds like a mix of switching recent tabs and Goto File (ctrl+p/cmd+p).
Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by lobster_johnson on Wednesday August 31, 2011 @05:47PM (#2947708)
Have you tried the "show files" panel? Ctrl/cmd-T. Works like TextMate's. Works like ctrl/cmd-P except it only accepts files, and will show a default file list when it opens.
Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by sunchild on Wednesday August 31, 2011 @06:26PM (#2947872)
Well, that was my original point above – the difference between cmd-T in TextMate vs. Sublime Text 2 is that TextMate ordered the files with the most recently opened at the top.

In TextMate, I got used to using cmd-t to jump back and forth between files. Minor thing, really. I just wondered if anyone hacked that same behavior into Sublime Text.

Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by sunchild on Wednesday August 31, 2011 @11:20AM (#2945906)
I missed that somehow, although it seems perfectly obvious now. I'm flexible enough to relearn a familiar key binding. (How often do you hear that in reference to a text editor?!)

Thanks!

Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by lobster_johnson on Wednesday August 31, 2011 @06:30PM (#2947885)
Wish it could be hacked, but while you _can_ create search panels like that, you can't access the list of recently opened documents, as far as I've found.
Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by edanm on Wednesday August 31, 2011 @06:40PM (#2947920)
Sublime Text 1 had a plugin that gave a Most Recently Used shortcut to open recently closed documents. It used the file-opening hook, recording ever file to an sqlite DB.
Re:Sublime Text 2 (Build 2111) gets vi key bindings, indent ... by swah on Wednesday August 31, 2011 @09:50AM (#2945500)
I also like it so much I wish he would go meta and tell us about the initial (winning) choices he made for developing ST2.