Live data from Hacker News

Setting up Sublime Text 2

blog.alexmaccaw.com

101–110 of 141 posts

Re: Setting up Sublime Text 2

#101
post #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?

When I use remote machines I mount them with samba / ssh so I can use an IDE / Sublime

Re: Setting up Sublime Text 2

#102
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…

The default is pretty horrid I think. The sidebar's blue draws way too much attention. Folders and files aren't differentiated nearly enough. The tabs also draw too much attention to themselves. Honestly it looks like the most barebones Mac app that there is, which is exactly what it is. The icon isn't much better. Looks very generic and 99 Design-y, doesn't express what Sublime is about at all. I personally prefer this one: http://dribbble.com/shots/311515-A-Sublime-Text-2-Icon-that-...

Re: Setting up Sublime Text 2

#103
post #46

Earlier quoted context omitted.

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 think vi speed is much more theoretical than practical. v5j to select the 5 lines below? Sure, I can't think of a faster mode. BUT in reality 1. you have to check if you're in insert mode or not. Or you think you are, you're not, write vf5, press esc, press u to undo, retype vf5. Or you don't know and you press esc before it, so it's actually esc+v5j, and esc is not the easiest reachable key 2. you have to know you…

There's nothing wrong with typing Vjjjjj until it looks right, and you can still click and drag if that's what seems easiest to you. But if you're thinking of it in lines and characters you're missing the real advantage.

You're still mentally translating a what into a how. You almost certainly don't want to highlight 5 lines down for its own sake, you probably want to highlight, say, the body of a function. Vim provides a command to just do that directly.

Re: Setting up Sublime Text 2

#104
post #46

Earlier quoted context omitted.

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 n…

In fact Plan9's sam and acme claimed the use of mouse was indeed faster based on studies. See http://plan9.bell-labs.com/wiki/plan9/mouse_vs._keyboard/

Re: Setting up Sublime Text 2

#105
post #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, wh…

By toggle do you mean change whether it reloads it?

Re: Setting up Sublime Text 2

#106
post #105
post #83

Earlier quoted context omitted.

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, wh…

By toggle do you mean change whether it reloads it?

Basically, yes, but with a prompt. Notepad++ will prompt you that a loaded file has changed and do you want to update it. ST2 will just load the file as soon as it realizes the file has changed.

The NP++ behaviour is ideal and a feature I use a lot. Unless something has changed very recently in ST2, there is no way to duplicate this behaviour. I believe there are some circumstances where ST2 will prompt you. IIRC if the file name has changed, but this is only part of the problem for me.

Re: Setting up Sublime Text 2

#107
post #3

Earlier quoted context omitted.

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.

That sounds great and diligent. Me and commits never seem to sync properly anyway (mostly because I am the sole dev on so many projects I guess).

Re: Setting up Sublime Text 2

#108
post #46

Earlier quoted context omitted.

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 think vi speed is much more theoretical than practical. v5j to select the 5 lines below? Sure, I can't think of a faster mode. BUT in reality 1. you have to check if you're in insert mode or not. Or you think you are, you're not, write vf5, press esc, press u to undo, retype vf5. Or you don't know and you press esc before it, so it's actually esc+v5j, and esc is not the easiest reachable key 2. you have to know you…

2 - That's where relative line numbers come in.

Re: Setting up Sublime Text 2

#109

Earlier quoted context omitted.

What bootstraps package manager?

Sorry, I keep that whole plugin as part of my dotfile repo. When the plugin upgrades itself, I just commit that upgrade. When I install my dotfile repo on a new machine, I have a script that symlinks everything to the repo, including my ST2 data. I then have my .gitignore set up to ignore all the plugins that get installed, but specifically track changes to the package manager plugin, as well as any other custom plug…

My bash-fu isn't great, can you point me at an example of a script which does this (yours or someone else's)? I was literally thinking about moving my ST2 config into my dotfiles repo the other day
Post reply on HN