
Sublime Text 2 (Build 2111) gets vi key bindings, indent guides - nikuda
http://www.sublimetext.com/blog/articles/sublime-text-2-build-2111
======
wbond
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.

~~~
dlikhten
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.

~~~
kellishaver
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.

~~~
Groxx
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/>

~~~
chrisrogers
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.

~~~
Androsynth
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.

------
frou_dh
What I love about ST2 is that although it's very data-driven in configuration
(several hierarchies of plain text configuration files + a simple python API),
it somehow doesn't seem overwhelming, or that I'm missing all the cool tricks.
I hope the author continues to comment all the configuration files and will
document 100% of the API.

The editor itself has a great fluid feel. Looks-wise, the default theme is
nice, and "Soda Dark", which seems to be a community favourite, is gorgeous.

------
jamesmoss
Have they sorted out the rubbish file manager yet? When I open a directory I
don't need an animation of the contents sliding in from the right. This slows
me down. I want to switch to ST2 but there's just too many little things
holding me back.

~~~
jamesmoss
Okay maybe rubbish was a bit of an exaggeration but it's lacking in a lot of
areas:

\- No icons. Makes it hard to differentiate between files and directories at a
glance. \- No drag and drop, you cant quickly copy and move files. \- Renaming
files is clunky (on OS X at least). \- Right clicking a file doesn't give you
many useful options. \- Doesn't match the host OS's file manager very well.
It's some sort of weird middle ground; on Windows it should act like Explorer,
on OS X it should use the same conventions as Finder.

Compare the file manager to the ones in Coda and Espresso and it's fairly
poor. I know the ctrl/cmd + p shortcut is pretty amazing but sometimes you
don't know exactly what you're looking for and have to fall back to browsing
through a codebase to find what you're after.

This post sounds a bit hateful, but I really like the rest of ST2. It's just
the file manager which gives me grief.

------
pilif
Now that I finally found out about remember_open_files, Sublime might grow
into a viable TextMate alternative.

I had real trouble finally finding a reference of the configuration settings.
The official documentation on version 2 on sublimetext.com is still in its
very beginnings and it wasn't clear to me that sublimetext.info is actually
valid documentation for version 2.

As a hint: Maybe add a comment to the global configuration file poiting to
<http://sublimetext.info/docs/en/reference/settings.html> for a list of
possible settings plus a note to add the settings to the user configuration
file.

On a related note, the reason I want to turn off remember_open_files is
because for me Sublime is not the editor I'm doing most of my project work in
(I'm using IDEA with Rails and PHP plugins), so Sublime (or currently
TextMate) is just something I use for quickly opening a few specific files on
the command line or from finder.

Seeing all the old files open alongside the current one is just distracting,
so I really need it to forget about previous incarnations.

------
bguthrie
Sublime Text is a great editor. As a sometime vi guy, this makes me super
happy.

------
GeneralMaximus
ST2 is brilliant. If you're used to TextMate, I encourage you to give it a
whirl. I think the trial version is an "unlimited" trial. It only nags you
with a dialog box once in a while.

~~~
xorglorb
You should still buy it though. The authors made a great product and deserve
to be compensated well for their work.

~~~
tudorizer
I second that.

------
jasoncodes
If you're a Vim user and like the idea of indent guides, check out
<https://github.com/nathanaelkane/vim-indent-guides>

~~~
briancarper
Interesting. A similar feature built into Vim is `cursorcolumn`, which will
highlight the background of whatever column the cursor is in. If you set
`cursorline` as well, you get a kind of cross-hairs around the cursor. See
e.g. <http://briancarper.net/vim/cursorcol.png>

I find that feature useful enough that I've never needed indent guides. If you
jump the cursor to the beginning of a line, you can easily see which other
lines are indented equally with that line.

------
timmfin
I've been using sublime text 2 for a month or so now and I am starting to
become a big fan. I think that I'll purchase it soon. My requests...

1) Add all of the menu commands to the list of commands that show up when you
press cmd-shift-p. It is very weird that some of the named commands (like
convert to spaces) are available via cmd-shift-p, but others (like switch to 1
column view) are not.

2) I prefer the way textmate does multiple selection, where you can press a
single key to toggle between regular selection mode and block selection mode.

Using cmd-shift-up/down in sublime text is very unpredictable. It works fine
in the case you have several consecutive lines with no extra newlines in-
between, but that is about it.

Though cmd-d to multi-select the next same word is pretty awesome.

3) Easier navigation between tabs in differnt split columns. I never remember
the keys to switch between columns and I feel the existing normal tab
management keys could do the job with a couple of tweaks.

For example, cmd-t is awesome, but I wish it was smart enough to automatically
switch to an existing tab instead of opening a new tab with the same file in
it.

Also, make cmd-shift-{ and cmd-shift-} move across all tabs and not just the
tabs inside the currently selected column.

4) And lastly, the find in project results desperately need syntax coloring.
It is so hard to scan a giant blob of plain white text.

Ackmate style file types would be nice too, but that isn't to big of a deal.

Again, awesome stuff. I can't wait to try out the vim bindings and I hope he
keeps up the good work!

------
edanm
So looks like I need to give Sublime Text another shot.

I switched from ST1 to vim after almost a year of using ST2 exclusively for
work. I very, _very_ highly recommend you try Sublime Text out - I've used
many editors, and Sublime Text is still, for me, almost the perfect mix of
must-have features and ease of use. Alas, vim's amazing power was a little too
much of a draw.

And if you try out Sublime Text, don't forget to check out it's killer feature
(which _doesn't_ have): Multiple Selections. They're the single most powerful
non-obvious editor feature I've ever seen, and I greatly hope they make their
way to _every_ editor when people start to understand that.

In the meantime, this new vim mode might just might bring me back to ST2 full-
time. Here's hoping!

------
endtime
Thanks for adding indent guides; that's one of the must-have features of
Komodo Edit for me.

~~~
CWIZO
Please do buy it after you'll be convinced that this is the best editor you
have ever used :)

~~~
CWIZO
Woops, only realized this now ... this should be under some other comment,
don't know how this happened :\

~~~
sixtofour
Been there, done that, own the downvote.

------
kristiandupont
ST looks really promising and I am excited to see where it will go.

I still use Code Browser (<http://code-browser.sf.net>) which is oriented
around folding. One feature from it that I really miss in other editors is the
"Clone Window" function that creates a new tab of the same file, scroll and
cursor position. IMO, this beats using bookmarks because you simply close the
new tab to go back to where you were.

~~~
Pheter
Code Browser has a really interesting approach to organising your code. Does
anyone know of any text editors/IDEs that implement code folding in a similar
fashion for Mac OS X?

~~~
kristiandupont
The source did actually compile on OS X once but he hasn't been keeping it up
to date and now I get a segfault. I am considering throwing some hours at it
because I really want it on my mac..

~~~
Pheter
If you do decide to try and get it compiling then I would really appreciate it
if you could let me know how you get on!

My email is in my profile.

------
duck
I would of checked out ST before, but I was thinking it was an Apple product
based on the screenshot the article uses (I went back to the beta announcement
and it shows the Apple interface as well). I see on the home page you use
Windows screenshots now, but I didn't even think about visiting that page last
time.

Maybe add some Apple/Linux/Window icons or text on the top somewhere so they
show on all your pages? Looking forward to trying it out!

~~~
ConstantineXVI
ST1 was Windows-only. I'm taking a guess that jskinner switched to a Mac
before starting/releasing ST2; going by the OSX screenshots and he's listing
Apple keybindings (Cmd vs Ctrl) first.

------
lobster_johnson
I love Sublime.

If you're like me and prefers TextMate's simple cycling autocompletion
(usually bound to the escape key) to Sublime's weird snippets-and-best-match
tab completion, I made a Sublime Text plugin that gives you just that:
[https://github.com/alexstaubo/sublime_text_alternative_autoc...](https://github.com/alexstaubo/sublime_text_alternative_autocompletion)

------
ianbishop
I really wish that there was an auto-update. I've been using the beta for some
time now, Jon's amazing constant updates actually becomes frustrating because
you have download an installer every update. I would buy a license in an
instant if this could be implemented.

~~~
TrevorBurnham
Wait, which OS are you running? On the Mac, just opening the editor gives me
this handy dialog (note the "Automatically download and install updates in the
future" checkbox): <http://cl.ly/0e2S0h0O011S0U3p2w0I>

------
neovive
Anyone able to get Zen Coding running on ST2? I'm following the instructions
at:
[http://www.sublimetext.com/forum/viewtopic.php?f=2&t=580...](http://www.sublimetext.com/forum/viewtopic.php?f=2&t=580&p=10654#p10654)

~~~
wbond
Myself and a number of my coworkers have installed it. You basically just need
to clone it into a folder called ZenCoding inside of your Packages folder. You
can find the Packages folder by going to the Preferences > Browse Packages…
menu entry.

The alternative is using the package manager I wrote
<http://wbond.net/sublime_packages/package_control>. This also gives you the
benefit of automatic updates and a whole bunch of other packages at your
fingertips.

~~~
lobster_johnson
Package Control is very cool, thanks for creating it. As an author of a
Sublime plugin
([https://github.com/alexstaubo/sublime_text_alternative_autoc...](https://github.com/alexstaubo/sublime_text_alternative_autocompletion)),
how do I submit that package to the list fetched with "Discover Packages"? Do
I add the binary package file to my Github repo, and then ask you to add it to
the official package repository?

~~~
wbond
You can fork the package_control_channel on GitHub
(<https://github.com/wbond/package_control_channel>) or BitBucket
(<https://bitbucket.org/wbond/package_control_channel>) and send a pull
request. That or you can email me.

You don't need to create a binary package file as Package Control can work
directly with GitHub and BitBucket. Simply add the regular https URL to your
repository.

~~~
lobster_johnson
Ah, excellent. I went for the pull request method.

------
BasDirks
Currently stuck on an ancient WinXP box due to my MBP frying itself, so I
decided to see how ST2 runs on it. Absolutely wonderful experience @
1.3Ghz/256RAM, and the vintage mode finally makes it a viable option for all
my programming.

------
Androsynth
For the past couple months, I've been trying to move from ST to vim, but
couldn't get over my love for goto-anything; the usefulness of the minimap;
and all the little details that made ST a great editor. This is great to hear.

------
strmpnk
Very well done. The last few revisions has basically turned v2 into my full-
time editor for most code. I still found myself reaching for vim so it's nice
to have some more key parity between the two now.

------
joshuacc
I love the UI, but can't seem to figure out how to open a directory without
starting a new project. Am I missing something?

~~~
wbond
You can drag a folder onto the sidebar, or use the command line interface to
open a folder. If you are on OS X you need to create a symlink for the subl
executable <http://www.sublimetext.com/docs/2/osx_command_line.html>.

~~~
joshuacc
Thanks for the suggestion. That's definitely an improvement.

Though from what I can tell, it just adds the folder to the current project,
which feels a bit odd. And having to open up Windows Explorer instead of just
doing a File > Open Directory is clunky.

~~~
lobster_johnson
The newest build has "Open Folder…" in the File menu.

~~~
joshuacc
Thanks. I just saw that. Not sure why, but I didn't see it until after I
restarted the program twice.

------
swah
Could not download update yet, but I still have a problem with the black tabs.
If the tabs matched the project drawer... :)

~~~
wbond
One cool thing about ST2 is that is it fully theme-able. There is an alternate
theme called Soda that has both a light and dark variant. You can grab it with
git from <https://github.com/buymeasoda/soda-theme> or use the package manager
I wrote <http://wbond.net/sublime_packages/package_control>.

~~~
jjm
+100000. Wow. Package control and Soda is awesome. Where have I been? I never
really liked the dark tabs personally and this fixes it! This should be on
ST's main page lol.

------
urza
Can it convert files to different encoding? (I noticed "open with encoding",
but nothing like "save with encoding")

------
chetan51
Is there any way to have it enter command mode instead of insert mode
automatically after opening a file?

~~~
chetan51
Excellent, I found the setting:

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

------
mtogo
Sublime is (excluding vim) by far the best text editor i've ever used. I just
wish i could afford it.

~~~
Androsynth
You can download it for free. As far as I can tell, the only difference in the
unregistered version is that it frequently pops a box asking if you want to
register.

~~~
swah
This (not time limiting) is really useful for folks that want to keep testing
it from time to time until some feature is available.

------
Raphael
Needs C-[ to double for Esc.

~~~
jskinner
Agreed - I'll make sure this gets in for the next version

~~~
CWIZO
Hey, sorry to trouble you here, but I had this problem:
[http://www.sublimetext.com/forum/viewtopic.php?f=3&t=287...](http://www.sublimetext.com/forum/viewtopic.php?f=3&t=2877)
and I can't find a solution anywhere, maybe you have an idea of what I'm doing
wrong?

~~~
jskinner
I've posted a follow up on the forum - in general, feel free to email
suppport@sublimetext.com if something is overlooked on the forum.

------
swah
Would be cool if folks that bought ST2 could suggest and vote for features.

~~~
T-R
<http://sublimetext.userecho.com/>

------
nvictor
yep, HN killed the host.

------
adgar
I like how, in the screenshot, line 1337 is presently active. That just can't
have been an coincidence.

