108 comments

[ 2.9 ms ] story [ 148 ms ] thread

  -Automatically closing windows when the last tab is dragged out
This is so minor, and yet so great.

EDIT: I copied and pasted the wrong one.

What exactly does this do?
I had accidentally copied and pasted the wrong one.
edit: this explanation was for the pre-edited point:

  When the last file is closed, a new transient file is created automatically
before when you closed all tabs you were left in this weird state where there was no buffer to type in until you created/opened a file.

Now it behaves as if you'd just opened a fresh window, where you have a buffer that becomes an "untitled" tab the moment you type something.

I believe it means hat when you close the last open file, it opens up and empty, unnamed file instead of just closing the window. The same behavior as opening the editor with no files to restore.
Agreed this was a constant pain for me.
Can you explain your workflow? I don't understand why people would use tabs in a text editor. Do you open a file, edit it, and then close it after you're done?

I currently have more than 4,000 buffers open in Emacs and I switch between them instantly using fuzzy matching. I rarely kill buffers. I just leave them open.

I'm interested in other workflows and I'd appreciate it if someone would help me understand how tabs can be used effectively. Thanks.

(comment deleted)
Personally I like to keep to about 10-15 tabs open with the files I am currently working between. This set of files changes every couple of hours to I can't hold them in memory and it is good to have a nice visual reminder of where what I am looking for might be (bearing in mind that a lot of the time I can't think of the name for what I'm looking for).
Generally, when I'm working on a specific task that affects a handful of files, I'll have all of those files open in tabs. This provides a visual cue for each file (i.e. I know the "main" file is in tab position 1, the class that it calls is in tab #2, etc etc).

Furthermore, I can switch between tabs quickly with cmd + 1, cmd + 2, etc, or via cmd + option + left/right arrow. This can be quicker than fuzzy matching (which sublime text supports, btw), and it requires less mental overhead of remembering what the file is called when you want to switch to it.

I tried the whole "never close anything and fuzzy match to change", it never worked. I always end up thinking "what was that file i was editing 2 minutes ago called?"

I tend to cull open tabs when I have more than ~10 open. I guarantee I can look at my tab bar, move my hand to the mouse, and click on the tab I want faster than anyone can switch using fuzzy matching

I try to always have a set of at most ~5-6 files I'm actually working on (depends on the kind of work I'm doing but in most cases that works pretty well). I can then use Cmd+1/Cmd+2/... to switch between them which is way faster than any fuzzy matching (which I would use to switch to a different file). I work on many projects with very similar file names/directory structure which makes project windows (globally) and tabs (project locally) very nice.
As an avid Vim user I really like the regular updates on Sublime Text 3 and I can see how I would enjoy some of its features like multi-cursor support. The shortcuts remind me more of Emacs, though. Here's hoping that Sublime will continue to be strong and won't go the way of the dodo soon (like Textmate did...).
Sublime has very solid support for VI keybindings using a plugin that ships with the editor but is disabled by default.
If you are a regular vim user the keybindings in Sublime vintage mode aren't anywhere near adequate. It's more like a cute quirk than a real feature.
>If you are a regular vim user the keybindings in Sublime vintage mode aren't anywhere near adequate.

I find them perfectly fine, and have been using Vim since the mid-nineties, in things like SunOS and HPUX.

You don't have to take advantage of every key command Vim offers to be productive. In fact, focus on the code.

Sublime is missing support for vim actions when used in combination with / or ?

For example:

   d/abc (i.e. delete forward until the text 'abc')
or

   c/abc (i.e. change the text going forward until the text 'abc')
I can workaround most of the missing functionality, but this one is a deal breaker for me. Unfortunately since / just uses the built-in Find feature in Sublime, fixing this is probably non-trivial.
You can activate Vintage mode (vi mode). Isn't 100% the same as vi but for me it does the job :-)
I'm a diehard Vim user, but have had to use ST+Vintage to pair on a coworker's computer. It's great for about ten seconds. Then your brain gets tricked into thinking it's actually Vim, tries an unsupported shortcut, and gets horribly confused. Incredibly aggravating.
Have you tried the Vintageous plugin? I'd be interested to know if it's any better.
I have, personally. It's great, but this:

    { "keys": ["j", "j"], "command": "set_action", "args": {"action": "vi_esc"}, "context": [{"key": "vi_must_change_mode"}, {"key": "vi_is_buffer"}, {"key": "vi_mode_insert"}] },
    { "keys": [";"], "command": "vi_colon_input", "context": [{"key": "setting.command_mode"}, {"key": "vi_enable_cmdline_mode"}] },
is the reason why I still use Vim.
The Vim way, for context:

    i[nore]map jj <Esc>
    n[nore]map ; :
I thought the multi-cursor thing was way neat when I first saw it, it demos brilliantly. Having since switched to Vim which has visual block selection - I don't miss this.
For me the best change is this

  Added image preview when opening images
It's weird, I would never have even realised this bothered me until I saw it in the patch notes, then I instantly remembered all the times I was looking for an asset and had to switch to the file browser to find it
What is the use-case for opening images in a text editor?

I'm not a user of Sublime text, but at least the landing page doesn't mention being able to edit images ... Except as raw binary I guess, but that doesn't sound like something you do very often.

Checking assets would probably be the main use-case.
You wouldn't be launching the editor to view an image. It's more for previewing images that happen to be in the directory hierarchy you already have open as a project (which is shown as a treeview in the sidebar).
Since dimensions are also displayed, it's pretty handy for writing sprites in CSS. Although it doesn't display coordinates when you hover your mouse.
(comment deleted)
If anyone is looking for the dimensions like I was, they're in the status bar area along with the file size. I feel like this information should be a bit closer to the image, but I understand not wanting to break conventions.
This is great for hand editing SVG's, unless sublime is only handling bitmaps. I use SVG previews all the time in emacs for making little fixes.
At the very least, being able to see a quick preview + dimensions of the image is way better than seeing a huge chunk of binary code.

Considering how often web developers have to muck around with images, this should have been baked in from the start.

Likewise, this is super handy. I really missed this from Textmate.
"Vintage: A block caret is now used"

Christmas came early... I've been waiting for this for so long.

Its not a very good caret though...
I must agree, it is very badly visible, unless I am missing some setting that would make it a solid block of bright color under current character...
Could someone explain to me what the two top left arrows are supposed to do?
When you have a lot of tabs open, they start to "scroll" across. Clicking these arrows lets you see more.
I like sublime, but what I would give to have it ditch the open file list paradigm entirely, replace it by a file history, and keep the undo info regardless of the open/closed state.
That's funny, because I wouldn't want any of that.
You probably haven't used buffers in emacs or vim nor seen the powerful undo systems of either.
Which is probably why they use Sublime Text.
Yes I'm just a rube who couldn't possibly understand why your opinion is the only right way.
Oops! My intention was that some people have preferences to something that just works and stays out of their way. Not that any killer feature convinces someone to use a tool, but the opposite. Overall accessibility to a specific user is the only thing that matters. :)

FWIW, I'd use Sublime if all vim bindings worked but that's not possible given its other critical features nor the project's current goal.

Why? I use Emacs and Sublime Text.
Why would you not want it to remember undo's from last time you had a file open?
Because after a little bit of time has passed, I no longer remember where the file was at. If I can not remember enough, I can not intelligently undo actions.

I use undo to to specifically undo a specific action. Beyond that, I am looking at writing something new to deal with what I am trying to have the file/document/program do or say.

So because you can't sometimes remember what you were doing in a file you would never want a feature that would have undos even for files that were closed? Ok.

And what does the file being open have to do with remembering what you did it in it? You could have a tab open for ages in ST and I bet you are as likely to remember what you were doing in it as you were in a file recently closed, so why should that impact whether undos were available for it? No need to answer, these were just rhetorical questions to point out the flaws in your reasoning here. I actually don't want to read any more of what you have to say about it.

> So because you can't sometimes remember what you were doing in a file you would never want a feature that would have undos even for files that were closed? Ok.

Yes I believe it's called 'That's how I work.' I don't use undo that way, so I have no desire for it to work that way, especially not along with all the rest they wanted.

> And what does the file being open have to do with remembering what you did it in it?

Maybe it was open for a reason? Maybe I was actually working on it. Shocking really.

> You could have a tab open for ages in ST and I bet you are as likely to remember what you were doing in it as you were in a file recently closed, so why should that impact whether undos were available for it?

Very good, I am unlikely to remember what I was doing, I don't use undo in these circumstances.

HINT: I might not use undo the way you do. I undo immediate actions. That's about it.

* Added image preview when opening images

My favourite change.

distraction free mode on gnome without menu bar!
I love full screen mode in OSX. With a trackpad to hand (pun intended) I can swipe back to my browser, check the output and continue. It's beautiful.
* Windows: SSE support is no longer required for 32 bit builds

I wonder how long we're going to be held back by (very) legacy machines. Valve also recently dropped SSE2 support because 0.0004% of their users complained about it.

Would love to know when ST3 will be out of beta...
When ST4 will go in beta.
and you need to pay for a new $70 license to be able to use it.

Yeah I dunno either why this dude is doing a paid beta.

It's not a paid beta, since ST2 licenses are compatible with the ST3 beta and dev builds.
You can also download and run the ST3 in trial mode for free.
wow, still no input method support on ubuntu.
Does anyone know how to make "ctrl+tab" & "ctrl+shift+tab" do the predictable thing? The order is impossible to predict at the moment.
Open your user key-bindings (in OSX this is Sublime Text -> Preferences -> Key Bindings - User), and put

  [
    { "keys": ["ctrl+tab"], "command": "next_view" },
    { "keys": ["ctrl+shift+tab"], "command": "prev_view" }
  ]
Thank you so much for this...

you have just made my day

Thanks. I've been living with not having this for a LONG time. Just never had time to deal with it.
The default behaviour is to switch tabs in a "last used" order. To change it, add this to your key bindings:

{ "keys": ["ctrl+tab"], "command": "next_view" }, { "keys": ["ctrl+shift+tab"], "command": "prev_view" }

You hold Ctrl (or Shift+Ctrl) while you tab to cycle all the way through all your tabs. The first time you press the combination, it switches to the last tab you were in. This is how it is in version 2, anyway.
The most annoying change for me will be the automatic closing windows when the last tab is dragged out. Now I will have to manually drag it out of the main window to create the second window again.
I believe setting "close_windows_when_empty" to false in your preferences should prevent this.
Question for current ST3 users: how stable is this ST3 beta as compared to ST2? I tried an early beta and it crashed horribly in the middle of a code-marathon, lost me a few crucial bits of code. Switched back immediately to ST2.

Is it safe to install this ST3 beta now?

PS: I'm referring to the Ubuntu 12.04 LTS 64-bit version, if that matters at all...

The only issues I've had on OSX are plugin compatibility issues with Python 3. It's been more than stable.
I switched over after the last build and things have been really stable.
I've been using it since the first beta build. Never had an issue.

It's so much faster as well, even though Sublime 2 was quick. The new plugin system I can't live without either, so many nice plugins.

Never crashed IIRC.
I think so. I only switched to ST3 because ST2 was being a giant pain in the ass with it frequently deciding to add my current theme to the 'ignored' packages, frequently not showing the sidebar when launched with a directory as an argument, and similar quirky bugs. ST3 has been solid as a rock in comparison and is a lot faster/immediate as well.
Occasionally crashes for me (32-bit Arch). I just updated to the new build to see if it's better.
I've been using it for a few months now on OSX and I don't think I've had a single issue so far.
I've been using ST3 on OS X for a few months. It works great for me. No problems to report .
Had problems with the initial release but haven't had any issues in quite a while.
New to this editor, but $70 per license? As an Emacs user, I really don't understand why one should pay $70 for this, which is even not an IDE, while there are powerful ones like Emacs and Vim that can do almost everything you can imagine..
I use both Vim and Sublime and feel that supporting the developer by paying him, to ensure constant updates isn't really an issue.

It may not be an IDE, but it certainly is powerful enough not to matter and a lot more user friendly than Vim

If a person were to feel that this made him or her more productive on important work, $70 is hardly anything. Certainly, if you felt that Emacs and Sublime were very similar, just go with the free one, but if you prefer Sublime, $70 isn't much at all.

$70 for something that will last you a few years or so isn't much at all for any job or hobby. I have a camera built into my phone, but I still buy dedicated cameras because I get additional use and pleasure out of them. If I didn't, I'd just go with the one that comes with my phone.

You should try the unlimited trial first, then you'll appreciate the value.
The $70 is so insignificant, yet there is always someone who can't see why they would ever pay a cent for their tools. I spend 40 hours a week in an editor, making it around $0.03/hr over a single year.

If you like Emacs or vim, then knock yourself out. I'm sure you are very productive. They both have a huge learning curve, and many people don't want that. Using ST or TextMate really feel different from either Emacs and Vim, and I prefer that feel.

Depends upon the user. I tried it for like a week on Windows, but found Notepad++ with some plugins works just the same and is free. Other people rave about it. tomato, tomato.
Let's say an hour of my time is worth $20, which is what I currently make at my student job, so it's pretty fair to call that my going rate.

Could I learn to be productive in emacs in 4 hours?

I can't. I've tried.

SublimeText is like buying one more textbook, but one that I will use extensively in all my courses, unlike most of my books, that get little use in just one course.

Sublime text is basically textmate with cross platform support. If you've never used textmate, you'll probably not get why it's so neat.

There are things that I can do faster in vim (like finding files with Command-T), but overall I find it's the right mix of vim and textmate.

I still find the package and snippet system overly complicated, and they still haven't gotten everything right from textmate; but overall a good text editor.

I'm absolutely certain I'd have never switched to Vim if ST2 had been available when I was looking for a cross-platform TextMate replacement. TextMate -> ST2 would have been a very easy and quick transition.

"Unfortunately", I was already in love with Vim when the first public alpha of ST2 was released and I was seriously underwhelmed when I tried it. Or spoiled, maybe.

Anyway, I wouldn't suggest any new programmer to learn Vim and his craft at the same time: Sublime Text is a very fine editor and it's a lot easier to apprehend.

I bought it for a Modern Editor to replace Emacs. The editor is solid but there aren't many great plugins/community, like in Emacsland.
(comment deleted)
Anyone else having issues with Thinkpad T60 German-Keyboard and the default comment/uncomment short-cut mapping on linux? Anyhints reg. the root cause of the issues?
I use a spanish layout keyboard and the default comment/uncomment mappings don't work for me either, I remap them to:

  { "keys": ["ctrl+7"], "command": "toggle_comment", "args": { "block": false } },
  { "keys": ["ctrl+shift+7"], "command": "toggle_comment", "args": { "block": true } }
I've read through the feature list and changes from 2 to 3, but can any ST users here be so kind as to describe any issues they faced from migrating from 2 to 3?

My use of ST is not too different from out-of-the-box. The main non-included plugins I use are Emmet, Ruby Slim, and Markdown Extended, and of course the utilities needed to manage them, such as Package Control. And I have a shell shortcut to get to ST (who doesn't?)...other than that, nothing too fancy...so I probably shouldn't experience too many hiccups to my workflow from just installing ST3?

I switched early in the Beta 3 cycle and never had any significant problems. In fact, I'm so happy with 3 that I don't even use 2 any more at all. The only "weird" thing was a couple of packages didn't like it very much. However, at this point all the packages that you are likely to need work in 3.

Go for it. You won't regret it. :)

OK, I just need an encouraging push, thanks!
Any JSLint plugins that work will in 3 yet? Last time I tried 3, I couldn't find one. (It's been a few months).
I use JSHint Gutter and configure it to run on every save. It's really great.
What is tab scrolling?
The feature I really want from Sublime Text is split window views. I know you can open multiple tabs editing the same file and tile them side-by-side, but it's cumbersome. Visual Studio, for example, can split a window view just by dragging a resizer widget at the top of the scrollbar.
You can definitely split a window into multiple columns/rows in Sublime (View >> Layout). Possible I'm completely misunderstanding you though.
The problem in Sublime is that you have a limited set of layouts, those that appear in the Layout menu. In other editors, such as Emacs or the way Terminator works, you can just "split" the current buffer/view/panel (you get the concept) either vertically or horizontally, so you can build virtually any kind of layout.
Yes, I miss the GUI equivalent of vim's sp or vsp view splitting.