Live data from Hacker News

Setting up Sublime Text 2

blog.alexmaccaw.com

81–90 of 141 posts

Re: Setting up Sublime Text 2

#81
post #46

Earlier quoted context omitted.

It shouldn't be that surprising. I tried vim for a while, but I prefer sublime text. It's true that vim is more powerful, but for me that power seems to mostly theoretical. It doesn't seem to make me significantly faster in the real world. On the other hand, the basic text navigation keys in sublime text are the same as they are elsewhere in my os, so I don't have to switch in and out of "text editing mode" frequentl…

A bit off topic, but the big win with Vim (and, from what I hear, emacs) isn't the speed per se; it's the lack of cognitive load. "I need to replace everything after the equals sign", for example, takes less concentration than "I need to move my cursor to the beginning of the word after the equals sign, hold shift, move it to the end of the line, and then hit backspace". Once I got past the terrible learning curve, b…

I have a love/hate relationship with Vim due to that sort of thing. In theory I agree with you; in practice I find it very easy to mis-navigate in Vim and find myself next to the wrong equals sign, or on the wrong side of the equals sign, or what have you. And in my experience, recovering from one of those errors, as quick as it is, makes me wonder why I didn't just use the mouse (or trackball, in my case) to click next to the damn equals sign in the first place. (Keyboard jockeys -- which I'm frequently one of, to be fair -- often underestimate how fast using the mouse actually is, I suspect, because we think of it as, "Oh, I have to move my hand all the way over there and move something and then move back, that's nuts!" Again in practice, I suspect the mouse removes a great deal of the cognitive load involved in navigation, and that may balance out more often than we're inclined to give it credit for.)

Incidentally, in Sublime Text -- as well as Emacs and most Mac OS X applications, as this is a system-wide keyboard binding -- you could just hit ^K after the equals sign for "delete everything from here to the end of the line."

Re: Setting up Sublime Text 2

#82

Earlier quoted context omitted.

No, the main problem is that it screws up merges. Until Git can ignore trailing spaces as part of the merge strategy, it will be a problem when someone removes trailing spaces in one patch and someone else modifies (with real code) those same lines. If you have a largeish number of changes it will be a nightmare.

> Until Git can ignore trailing spaces as part of the merge strategy It can: git merge -X ignore-space-at-eol

Great, thanks!

Re: Setting up Sublime Text 2

#83

I tried to like Sublime, I really did. Bought a license and used it for four months, before going back to Emacs. Sublime is nice, and easy to extend, but it only extends so far, while Emacs is infinitely extensible. You can practically live in Emacs[1]; some things I wanted to do in Emacs were hard to pull off, but I'm yet to find something it can't do. And it does so for years. Fashionable editors come and go, but E…

I suspect there is far more of a flavour of elitism in ones use of a text editor than any true benefit in real world productivity.

I tried ST2 to see what all the fuss was about. I still use it occasionally (mainly for its layout view on the right hand side), but Notepad++ is my main editor as ST2 has a particular problem that you can't toggle the reloading of a changed file.

I use Vim for huge files.

In any case, when I am programming I spend more time thinking than typing and unless I am doing heavy re-factoring of code, more powerful text editors are just a non issue for me.

Re: Setting up Sublime Text 2

#84

One setting I find invaluable is to use Paste and Indent for ⌘V instead of the standard Paste. This adjusts your indentation to automatically match the context it's pasted in. To do this, put the following in your Key Bindings - User file: [ { "keys": ["super+v"], "command": "paste_and_indent" }, { "keys": ["super+shift+v"], "command": "paste" } ]

THANK YOU

Re: Setting up Sublime Text 2

#85
post #17
post #13

"The default website, icon, and theme are ugly to say the least" I can't be the only one who completely, utterly disagrees with this? I absolutely love the default theme and I think the icon looks great (much better than the alternative provided). That being said, I don't want to start a whole pointless discussion about taste here, it just kind of bothered me to read something like that in a blog post that talks abou…

Yeah, I didn't understand this either. "Sublime's initial look leaves a lot to be desired." Really? I think it looks great. Here's another post that calls Sublime's default theme "pretty ugly" and "god-awful": http://floatleft.com/notebook/making-sublime-text-2-beautifu...

Here's a tool that converts images to themes, for those who want something new: https://github.com/mlaugharn/swatch

Re: Setting up Sublime Text 2

#86
post #3

You shouldn't set "trim_trailing_white_space_on_save": true unless you work alone, otherwise you're going to have random whitespace changes polluting your diffs.

Our coding guidelines at Stripe specify that whitespace is to be stripped. It works if everyone does it. On the occasion where whitespace does pollute the diff, GitHub has a convenient feature where you can append '?w=1' to any diff URL and whitespace changes will be omitted.

we also have a rule that when possible (like you've opened up an old file with whitespace issues), that you should clean it and do a whitespace changes only commit before getting to work. It makes everyone's life easier if they're not looking for the "real diff" in your commit.

Re: Setting up Sublime Text 2

#87
post #29

I find it odd that Sublime is so widely loved. It seems like a way-station between Notepad and Vim/Emacs. The extensions are nice, and the GUI is easy on the eyes, but it seems that most of my peers outgrew their Sublime Text/Notepad++/Textmate stage by the time they completed their first year of undergrad. I would hate to be stuck in the slow world of Sublime Text limbo as a result of being too lazy to learn and cus…

You find it odd that Sublime Text is so widely loved? Seriously? It combines the greatness of some of the best editors out there into a single one that is approachable and sexy and you can't see how it appeals to the masses?

Let's list out some of my favorite features of Sublime Text (please keep in mind I switched FROM vim to Sublime):

1.) VIntage mode that allows for 99% of day-to-day vim stuff 2.) A plugin system that uses Python and offers a full-featured API (vimscript anyone? pfft) 3.) Full mouse/windows support (i.e. it's not ghetto mouse support thrown over a terminal window from the '70s) 4.) Textmate-style themes that even allows tweaking to the UI 5.) Native Linux, MacOS, and Windows versions

The only negative is that it isn't open-source, which I hate, but the licensing is very reasonable (it's per person, not machine, so you can install it on as many devices as you use)

I'd really like to see you give a real-world example of how it's slow compared to vim/emacs, because maybe I'm missing something. I've been using Sublime Text for over a year and have only had to break out vim a couple of times for some crazy vim-style search/replacing or to quickly open some super-large text files (I think better large-file handling is in the works for sublime though...).

Oh, and one of Sublime Text's best feature? It doesn't come with the elitist attitude that a lot of vim and emacs users seem to get... :)

Re: Setting up Sublime Text 2

#89
post #43

Earlier quoted context omitted.

I think the main problem with the ST2 icon is that it looks like a disk drive. I often ignore it because in my brain, I assume it's a disk and not an editor.

Interesting, to me it looks like an 's' key from a keyboard. I've always assumed that's what it's supposed to be. I never thought it looked like a disk drive. I guess it looks like an external desktop hard drive a bit though.

It not only looks like an S from a keyboard, that's absolutely what it is, no question.

Re: Setting up Sublime Text 2

#90
I do most of my editing on remote machines (both at work and at home) and haven't really been able to find a setup that works smoothly for this.

Is everyone else developing everything on their local machines?

Post reply on HN