
Sublime Text 2 Beta released with Auto-complete and Improved UI - sathishmanohar
http://www.sublimetext.com/blog/articles/sublime-text-2-build-2165
======
dflock
Anyone using this editor should install this plugin first:

<http://wbond.net/sublime_packages/package_control>

It's fantastic and gives you a simple in-editor way to add/remove other
plugins, direct from their github repos, without needing to leave or restart
the editor. It also automatically keeps them all up to date.

Once it's installed, you can just use the command palette (ctrl+shift+p) to
install any of these plugins: <http://wbond.net/sublime_packages/community>,
plus any others that you add via their github repo.

~~~
bobwaycott
I'd also recommend immediately installing SublimeCodeIntel and SublimeLinter.
These plus autocomplete have made ST2 the best editor I've used in 10+ years.
And the latest beta is even faster than before.

~~~
Hovertruck
CodeIntel never fails to make ST2 crash for me. :(

------
jasonkester
It makes me sad that the best tools available for writing code in so many
otherwise exciting languages are still resorting to text-based autocompletion.
And blogging about it as though it's something to be proud of.

This is certainly a pretty editor. But at its heart, it's still a _text_
editor. And what I do for a living is edit _code_.

Code has a lot more information about it than text. I can imagine looking at a
line such as:

    
    
      item.hide()
    

in this editor, knowing that my codebase has half a dozen classes that expose
a .hide member. I hesitate even to ctrl+click on it in this editor, because I
know it'll either do nothing or take me to the wrong definition.

In a perfect world (and in IDEs for statically typed languages since 1998),
the editor would know exactly which .hide we were talking about. And it could
gracefully send me there with a single click or keystroke.

I'm still waiting for something equivalent to appear for the
Ruby/Python/Javascript portion of my world. But years keep ticking by and the
best we get is text editors that try to guess by looking at text.

Maybe next year.

~~~
ceol
At least from my experience working in Python, if you don't know which
instance `item` is, it's a problem with your code— not the editor.
Automatically taking you to that class's method is another story, but I don't
think you should depend on your IDE to figure out your logic for you.

~~~
jasonkester
Ah, but the issue isn't _you_ knowing which 'item' you're dealing with. It's
that the IDE doesn't know, and therefore can't jump you there instantly if you
ask it to.

Instead, you have to open the file in question and go find the method using
one of the fiddly text-based methods that the article mentions.

So no, we're in agreement that the entire codebase belongs in your head. It's
just nice to have your IDE also have the entire codebase in its head, in the
actual configuration it is, rather than just knowing about a bunch of text
files containing words that have no meaning to it.

~~~
ceol
I suppose it was a misunderstanding. I took this

 _> knowing that my codebase has half a dozen classes that expose a .hide
member. I hesitate even to ctrl+click on it in this editor, because I know
it'll either do nothing or take me to the wrong definition._

to mean you were relying on your IDE to tell you which .hide() method you were
calling.

As others have pointed out elsewhere, I think giving that functionality to ST2
would push it too far into the realm of IDE.

------
pilif
My favorite feature (already added in an earlier development release, but now
finally in the beta track): On OSX, if you are editing a file you don't have
write access to and you want to save it, Sublime now asks for authentication
than then saves the file.

This is very convenient and not having this was _the_ reason for still having
TextMate around.

~~~
Simon_M
That's one annoyance out of the way. Is there a decent way to work with remote
files yet?

This is always the killer for me.

~~~
Deezul
Try this out: <http://wbond.net/sublime_packages/sftp> I haven't used it, but
I'll probably end up taking a look at it soon. Please report back if you end
up using it.

~~~
hackNightly
Been using this package for some time now and can say that it's been great.
It's super-fast, and is integral to my work flow.

------
stevecooperorg
Favourite Option: When you close the editor, it just shuts down, saving all
your buffers and restoring them when you reload. That means you can close the
app, reboot your computer, whatever, and the edits you've been making aren't
lost, and you aren't bugged for filenames.

Definitely a 'why don't all apps work like this?' feature.

~~~
macrael
This is the default behavior of document based apps on OS X starting with
Lion. For instance: TextEdit behaves this way.

~~~
statictype
Yeah, if you've been extensively using Lion for document editing, this may not
seem like a big deal anymore, but in Sublime it works just as well on Windows
too.

~~~
stevecooperorg
Yeah, It's new to me on Windows.

------
mixu
My favorite feature: a dedication from the developer to fix bugs even on
Linuxes they aren't personally running (Arch Linux in this case).

[http://www.sublimetext.com/forum/viewtopic.php?f=2&t=447...](http://www.sublimetext.com/forum/viewtopic.php?f=2&t=4473)

~~~
njs12345
Nice debugging! Definitely worth a read.

------
JonnieCache
Just so you know, these features have been available for weeks now in the dev
builds. They get updated almost every day sometimes, the developer is an
absolute machine.

<http://www.sublimetext.com/dev>

------
veidr
The great thing about ST2's autocompletion is that it is totally extensible,
allowing you to hack your own completion routines.

I wrote an indexer for Objective-J code last year, that scans a set of folders
(which can include the Cappuccino frameworks if you like) and creates a
completion index of all the class names, methods, functions, etc. It was
trivial to make an ST2 plugin that completes using that data.

The abilitity to write your own autocompletion plugins for the freaky/obscure
kinds of files you use really rocks. Even without heavy-duty semantic analysis
of the code, you can get 90% of the way there and it is really useful.

The main problem right now is that the UI is still too narrow. Voting this
issue up could help get that fixed:

[http://sublimetext.userecho.com/topic/85632-need-the-
complet...](http://sublimetext.userecho.com/topic/85632-need-the-completion-
menu-to-be-wider/)

~~~
itmag
What would it take to get it to be as smart as, say, Intellisense?

~~~
veidr
Well, that would really take a lot of work, to make it good.

There's some commented-out logic in the 'official' Cappuccino plugin for ST,
that takes into account the scope and then works backwards to try to figure
out what type of object you are messaging.

<https://github.com/aparajita/Cappuccino-Sublime>

But I think the reason that's commented out is that it is easy to get some
parts working, but to do it right you need to analyze the whole code base,
with a real parser, be able to follow the map of import/include statements
back to know what code elements are actually available in the current scope,
etc etc. And that's a lot of work.

Still, there's a lot of value in doing a good job with a simpler kind of
completion -- and it is way easier, as long as the editor is extensible to the
extent that ST is.

~~~
itmag
The reason that I ask is that I feel I am getting stuck with C# simply due to
the comfort of Intellisense. I have to find some way of replicating that
experience with other languages...

I know other languages of course, but it just feels like a hassle to code
without Intellisense these days :p

~~~
jablan
If you have dynamically typed languages in mind, give it a try without
completion, you might be surprised - different paradigm depreciates completion
quite a bit.

~~~
JonnieCache
Indeed. When getting really funky with ruby's metaprogramming, completion
isn't going to help you.

------
tumult
I really wish Emacs had smooth scrolling, indent guides and that Minimap.
Those are some killer features that you can't just implement in Emacs'
scripting language.

edit: minimap exists! (Obviously only in GUI Emacs)

Animated sub-line scrolling probably requires hacking the Emacs source. Indent
guides might be possible just in elisp, but I don't know how good they would
look.

~~~
Flow
<http://www.emacswiki.org/emacs/MiniMap>

~~~
nyellin
Let me point out that the Emacs minimap is way cooler than that of
SublimeText. Check out the semantic overlays.

------
1880
I don't know if it's something wrong with my eyes, but with the new theme I
get confused all the time searching for the active tab. Old theme had more
contrast.

Edit: installing Soda theme[1] solved it!

[1]: <https://github.com/buymeasoda/soda-theme/>

------
fullmoon
This guy has to be on caffeine, modafinil, and love for his product.
Incredible velocity here.

~~~
rd108
Is it... really just one guy doing the core dev work? (nonwithstanding plugins
and so forth)

~~~
stevecooperorg
Yeah, it's one guy called Jon. He's been really responsive when I've talked to
him.

~~~
rd108
That is amazing! I'm impressed....

------
Dachande663
All it's missing now is a better icon; preferably not another blue one.
Normally end up with this one (blue I know).
<http://www.designkode.com/blog/sublime-text-icon>

------
sunchild
This is such a great editor. Each update adds things I really appreciate. (How
did I ever live without indent guides?)

I've been working in XCode so much lately that I've gotten really used to this
style of autocomplete, so this update is very welcome.

~~~
alwillis
Yes—indent guides are pretty sweet.

------
bionicbrian
Sublime Text 2 is amazing. I bought it and used it for a bit. Even with
vintage mode, I missed vim too much and switched back.

I do wonder if the arrival of Sublime Text 2 was the impetus for TextMate 2
development after so many years.

------
sr3d
Split-screen support is still very clunky. I don't understand why you need to
define a new "group". Layout-wise it makes sense as preset layouts, but other
than that the group doesn't help at all.

The best split-screen implementation is E-Text Editor. In E, you can drag the
tab to create a new split, then "Cmd T" in ANY tab will bring you to the
previously opened file in the split. Basically I don't have to remember where
the file is opened, as long as I know its name, I can just jump by typing the
name. That is how quick jump should be. Also, you can arrange the windows by
dragging-and-dropping to another split. I stop using E after version 1 because
I made the switch Mac and I have to use Textmate, which does not support
split-screen at all (what a shame!). And I miss E dearly.

Currently Sublime Text quick jump is still bad, because it still requires a
context switch (switch to the group that has the file opened, then Cmd T), or
worse, complete loss of current context (Cmd T would open the file in current
group, thus you lose the view of the current file you're working on).

So as long as split-view doesn't get implemented properly, Sublime Text is
still just another editor.

------
Brajeshwar
Is this just me but no-one seem to talk about it. How can I get the Sidebar to
have a similar color scheme with my main theme? I like the default Monokai but
the Sidebar is light. The Soda theme & Color Scheme was nice but the new UI
improvement in the IDE is so good to sacrifice it for Soda.

~~~
bmj
Is this controlled by the color scheme itself? I'm running Solarized Dark, and
the sidebar does have the same scheme as the editing window.

~~~
Brajeshwar
Yes, this is part of the Color Scheme that you used.

~~~
flyosity
To change the sidebar color, you can go into the default Theme directory, find
the new global theme file and update it manually. It's all JSON, so just
search the file for "sidebar" and you should find the RGB string to play with.

------
kellishaver
Still no block cursor. :(

I've found/modified a little plug-in to simulate it, but it's not ideal.

I love Sublime, and I'm sure it seems trivial to most folks, but as a
developer with poor eyesight, this is the one feature I want the most.

At least fonts can be larger now.

~~~
oe
Using the vintage mode without the block cursor is annoying. It's really hard
to see when you are in command mode and when in insert. I'm using this block
cursor plugin <https://github.com/netpro2k/SublimeBlockCursor> but it has some
bugs where the cursor remains as a block until you write something.

~~~
kellishaver
This is actually what I'm using, though I've modified it some to work outside
of vintage mode, which also seems to have eliminated most of the problem (I
may have done more to it as well, I can't really remember now). The only time
the "block" disappears now is when the cursor is at the end of the file,
because there's no white space after it to highlight (which is logical).

------
octopus
A small bug with the auto-complete update when you edit a new C++ file (I've
checked this only on Mac):

When you start writing #in... Sublime will suggest you #include ... pressing
Enter will actually double the pound sign. You end up with something like
##include ....

I've noticed the same pattern for int m... the suggested completion was
main(). Pressing Enter ends up repeating the return type of the main function,
something like:

int int main(int argc, char *argv[]) ...

Maybe this a Mac only bug or it has something to do with the way the C++
syntax is parsed by the Auto-complete algorithm.

------
Deezul
I've recently started using Sublime Text 2 for iPhone development on Windows.
Okay I admit, I've been doing it for a while. Rather strange setup perhaps,
but with Synergy it's a fairly seamless workflow between my Macbook Pro and
Windows desktop. I keep telling myself I'll get around to purchasing a license
and this finally did it for me. I wouldn't say it's purely on guilt, more of a
slowly growing relationship. Auto complete is an enormous help, why wouldn't I
return the favor?

~~~
octopus
Just curious, why are you using Windows for iPhone development ? I mean there
is any advantage versus using directly your Mac ?

Thanks.

------
duck
If you use vim be sure to check out the Ex mode package:
<https://github.com/SublimeText/VintageEx>

~~~
statictype
Vintage mode is a killer feature for people (like me) who are wired for Vim's
modal editing. The fact that it works reasonably well (somes bugs here and
there but it's an alpha so understandable) is what made me even consider
Sublime in the first place.

Now, after having been using Vim for about 8 years now, after a few weeks of
trying Sublime, I'm pretty much ready to pony up for SublimeText 2 whenever
the final version is released.

~~~
blakeweb
Using 'vip' to select the current paragraph didn't work for me on osx (instead
it went into insert mode with the 'i'), so I gave up on my very brief trial.
Did I give up too soon? Or is that oversight typical of other quirks I'll run
into?

~~~
statictype
Could be a bug - I looked at the Vintage source when it was in alpha - they
had implemented text objects for many delimiters but I also found some bugs
with , for example 'ci{'.

------
tommyd
Wow, this is seriously nice. Never heard of it before. Just today I've been
trying out Netbeans as I'm a vim addict but my colleagues keep telling me how
wonderful their IDEs are - Netbeans was much too heavyweight for my liking,
but this looks like just the right balance between features and
simplicity/speed.

Loving the mini-map and package manager particularly. The vim emulation seems
to cover most of the key ones I use too. Nice work!

~~~
blakeweb
Vim keybindings didn't work well for me. In command mode tried vip to select
the current function definition and it instead went into insert mode with the
i. To me that means it's probably got lots of other quirks. Do you just not
use those types of visual mode operations? Or did it rather successfully
handle this for you?

------
pospischil
For those wondering, auto-complete is quite fast.

I've always avoided IDEs that offered this because they seemed to be terribly
slow -- pleasantly surprised so far.

~~~
cosmez
does it support any kind of CTags?

~~~
dflock
Yes: <https://github.com/SublimeText/CTags>

------
rmccue
> If you’re feeling adventurous, you may want to enable the
> auto_complete_commit_on_tab file setting: This will make tab accept the
> current completion, and enter operate as normal.

I've had this on for about a week now, and although it was initially very
disorienting, it's very easy to get used to it. I'd certainly recommend it,
since it allows you to add a new line even if a suggestion is there.

------
somecanuck
Has the ability to navigate via UNC been added? Or more importantly, has
search/replace with regular expressions improved?

I did a search/replace of [a-z] to 0 in a 50 meg text file before as a
comparison between Sublime Text 2, UltraEdit, and gVim. UltraEdit was slower
than I would have liked, gVim was < 10 seconds, and Sublime crashed. That's a
deal breaker.

------
AGemmell
New release looks great. One problem I have with ST2 is dragging tabs from one
window to another window. The actual dragging of the tab works but if it's the
last tab in the window and I remove it and put in another window, I'm left
with a window with no tabs in it. Can this "empty" window automatically close
please?

~~~
shawndumas
"close_windows_when_empty": true,

------
Simon_M
How do people deal with remote files? I love Sublime, but always end up
reverting back to VIM as it is so slow when accessing files over a network
connection.

I've tried the SFTP plug-in, but find it really clumsy. Ideally I'd just love
to be able to add a remote folder over SFTP the same way you do local ones.

~~~
leeoniya
try something like WebDrive, NetDrive, ExpanDrive or Dokan SSH <http://dokan-
dev.net/en/>

they create a mapped drive to a location of your choosing and you edit files
as if they were local.

i stopped worrying about the remote editing functionality in editors since.
before that i used winscp, which detects changes and re-uploads automatically,
but it's not as convenient.

------
fletchowns
I love the new look of the tabs, really nice improvement. Great to see
autocomplete is built in now, I was using this one before:
<http://news.ycombinator.com/item?id=3064171>

The new autocomplete even has lorem ipsum in it :)

------
notlion
I love Sublime, but I'm not really a fan of the new theme. It tends to be
lighter in areas where the previous version was dark, especially in the tab-
bar when using a theme like SpaceCadet.

Anyone know if it's possible to change the default tab background color for
themes that don't support it?

~~~
antihero
I think you can theme the UI as well as the syntax theme. Here's an example:
<https://github.com/buymeasoda/soda-theme>

~~~
notlion
Nice! I didn't know it was possible to theme the sidebar either. Soda Dark
seems pretty good, thanks.

------
thepreacher
Doesn't the new auto complete and the plug-in SublimeCodeIntel do the same
thing? One of my concerns is that say you are using a plug-in for a feature
that is later implemented into Sublime, now you haven't read the what's new so
you have no idea. What happens then?

~~~
freewizard
Not the same. The editor itself supports almost all file types with basic
auto-completion. SublimeCodeIntel supports a few scripting languages with more
intelligence. SublimeClang doing same smart job for C/C++/ObjC.

It's just based on your work pattern to decide which one to use. For me, all 3
of them are all very useful everyday.

------
michaels0620
I've paid for Sublime Text and think it's awesome. I primarily do Scala
development and would like to use ST for it but the one thing I miss are
highlighting errors in the source. Does anyone know a way to do this? I
searched the ST forums to no avail.

~~~
Pewpewarrows
While this plugin doesn't have Scala by default, it does include a Java
linter/checker. So you could theoretically fork and expand it to do Scala as
well.

<https://github.com/Kronuz/SublimeLinter>

------
cidermonk3y
Does anyone know how to display edge lines? I usually pass files through Code
Sniffer before committing, so generally i try to keep lines 120 characters or
less, seeing where that 120th character is; is really helpful.

------
cidermonk3y
I love the git package, superb. Managed to write a few custom commands to
tweak things to suit my requirements, haven't tried that with any other editor
/ IDE :)

------
mise
I'm torn between using a nice proprietary editor like this, or a fine open
source one like Scribes, or even going further into the command line world
like Vim.

~~~
sodiumphosphate
Good software is worth paying for.

I hope the developer is able to live comfortably while working full time on
his own endeavors, rather than relegate them to a hobby, and himself into wage
slavery.

~~~
mise
I can certainly agree with that.

------
lukeman
Was hoping for some sidebar love in the new theme (file and folder icons,
renaming files in place), but the changes seem good so far.

~~~
Baggz
+1

------
g3orge
I don't want to put the looks over functionality but when we are talking for a
GUI application we need a good icon.

~~~
ChrisLTD
There are some good replacements floating around the web. The one I think best
matches the aesthetic of Sublime Text 2 is here:
<http://dribbble.com/shots/337996-Sublime-Text-2-Icon>

------
zyb09
I'm confused, doesn't it already have auto-complete? Mine's been doing that
for a while now. What's new about this?

~~~
CWIZO
Are you using the dev version? If so, then yes you've had that for a while
now. It just made it into the beta now ...

------
leeoniya
primarily as a web dev, the only two things preventing me from switching from
NP++ is the poor and non-customizable matching bracket styling. and the buggy
html matching tag highlighting (and styling as well)

once those get addressed more fully, i'm ready to cough up the cash.

------
tommypalm
Anyone know how to get the Soda Theme working again?

~~~
aroberge
It needs to be installed under Packages not Packages/User. Look at the github
source for Soda Theme for further explanation... (I just read that this
morning).

------
iusable
Love the auto-complete! Keep up the great work.

------
foobarbazetc
Still doesn't feel like a Mac app...

------
rorrr
What I really miss in all these fast small editors is the quick-jump features
that actually analyze the code and let me do things like

1) Jump the the function/method definition (even if it's in a different file)
when I press Ctrl and click on the function name. Eclipse does this.

2) Quick find of the function/method definition across the whole project.
Eclipse does this as well (Ctrl + R).

I don't use Eclipse that much, because it's ridiculously slow, but it has cool
features.

~~~
est
> Jump the the function/method definition

for scripting languages, define a function as concatenated string in eval(),
how could you find the function definition, without actually run the script
for once?

Even if you run the script once, what if there is a delete_file() function you
accidently called?

So do we need to implement a sandboxed VM in order to find definition,
theoretical perfectly speaking?

~~~
rorrr
That's such an edge case. I've never seen anybody defining functions in evals,
especially as concatenated strings.

~~~
agento
Maybe you should take a look at the Rails sourcecode.

~~~
FooBarWidget
Rails only does that to optimize certain function calls. eval() is used as a
method to compile/inline certain functions. Most code in Rails does not use
eval.

~~~
drothlis
[https://github.com/rails/rails/blob/2-3-stable/actionpack/li...](https://github.com/rails/rails/blob/2-3-stable/actionpack/lib/action_controller/request.rb#L11)

Try getting your editor to find that definition of method "accept_language" or
"cache_control". :-)

------
hastur
No doubt Sublime has all kinds of nice features, but to me the best thing is
the aesthetics. It's simply a pleasure to work in this editor. Sometimes I
just like to have it sit there on the second monitor, while I do something
entirely different on the first one. :)

------
maalox
Only at HN will you find people gushing about a $50 text editor.

It's totally pathetic yet oddly endearing at the same time.

~~~
michaels0620
Actually, what's endearing (or outright cool) is that he has been able to
create an editor good enough that people are willing to pay $50 for it. With
lots of free alternatives and big players it isn't the easiest niche to break
into. The fact that he's been able to do this primarily on his own makes it
more impressive.

~~~
veidr
I agree; it's cool. TextMate never impressed me too much, but I bought it one
day when the author casually mentioned on MacSB that his order numbers were
simply sequential (so order number X meant that X licenses had been sold). I
was curious.

My order number was something around 5000. So Odgaard had grossed $.25MM
already. (At some point a couple years later I bought it again, and the order
number was like 48000. It's no wonder he disappeared for years on end.)

ST2 seems to be on that same trajectory.

(And the grandparent comment is idiotic, of course; a truly good text editor
repeatedly makes the news here just as a uniquely novel hammer would
undoubtedly be a prominent theme on carpenternews.com.)

