Live data from Hacker News

Setting up Sublime Text 2

blog.alexmaccaw.com

11–20 of 141 posts

Re: Setting up Sublime Text 2

#12

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.

I think it's fine so long as everyone agrees, or as long as people don't strip the whitespace in the same commit as their actual changes.

Half the time the pointless whitespace is introduced by an editor that auto-indents for you.

Re: Setting up Sublime Text 2

#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 about setting up a text editor.

Re: Setting up Sublime Text 2

#15

I actually like that the preferences are stored in JSON. This is one of the features that pulled me in to Sublime Text.

I'd love it if they were stored in dotfiles (something I like about Textmate 2), but at least all your config gets stored in a nice User package.

Re: Setting up Sublime Text 2

#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...

Re: Setting up Sublime Text 2

#18
post #4
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.

The number of pull requests I get where the diffs are completely unreadable because someone has this feature enabled is insane. On certain whitespace dependent languages (I'm looking at you Python) simply supressing the whitespace in the diff is not an option. What are the arguments for having whitespace removal as a coding standard?

It's dead easy to accidentally add (or remove) trailing whitespace, which you find out at git diff time. Unless you want to have whitespace changes in your commit, you have to manually revert those edits back.

Having the editor just trim those automatically is just delegating the trailing whitespace care to a piece of software with a simple rule: no whitespace allowed.

If the entire team working on a project agrees to this rule, everything's peachy, and it's really easy to convert an existing repo to it - whenever you touch a file, if there are whitespace changes, commit them to a separate commit.

At the end of the day, it's just standard, so doing invasive changes to a project that doesn't follow that standard (as in the pull reqs you descibed) is wrong, but that doesn't mean the rule itself is bad.

As for ST2, it allows easy per-project settings so you can easily enable it globally and disable on a specific project if needed (or vice versa).

Re: Setting up Sublime Text 2

#19
post #11

This helped me a lot when I got started with Sublime http://net.tutsplus.com/articles/news/perfect-workflow-in-su... Good intro to basic configuration, shortcuts & vintage mode

It's also free, and written by someone who actually used ST2 for more than a month.

Re: Setting up Sublime Text 2

#20
post #4
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.

The number of pull requests I get where the diffs are completely unreadable because someone has this feature enabled is insane. On certain whitespace dependent languages (I'm looking at you Python) simply supressing the whitespace in the diff is not an option. What are the arguments for having whitespace removal as a coding standard?

[deleted]
Post reply on HN