Live data from Hacker News

Setting up Sublime Text 2

blog.alexmaccaw.com

111–120 of 141 posts

Re: Setting up Sublime Text 2

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

I turned that feature off because of Markdown. To force a carriage return, you need to have two spaces at the end of the line.

Re: Setting up Sublime Text 2

#112
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?

You will never have silly diffs because someone accidentally changed some trailing whitespace (because there isn't any).

Re: Setting up Sublime Text 2

#113
post #74

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 love Emasc but it can't even do proper full screen. I really wish ST3 has more APIs in the Emacs spirit, but keeping it modern.

[deleted]

Re: Setting up Sublime Text 2

#114
post #74

Earlier quoted context omitted.

I love Emasc but it can't even do proper full screen. I really wish ST3 has more APIs in the Emacs spirit, but keeping it modern.

(defun full-screen () "Indicate to the window manager that this frame should be full screen" (interactive) (x-send-client-message nil 0 nil "_NET_WM_STATE" 32 '(2 "_NET_WM_STATE_FULLSCREEN" 0)))

That removes the borders? Any way, Unix only...

Re: Setting up Sublime Text 2

#115

Get me block level (vit, cit ...) commands in ST2 and I will switch. They are done very well in Vim.

Vintage mode (which comes with ST) supports most common vim commands and either way there's plugins for most things and you can write your own for pretty much anything at all.

Re: Setting up Sublime Text 2

#116
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 like the default theme. About the only thing I changed was the tab behaviour to highlight modified files ("highlight_modified_tabs": true) and make the folder labels bold in the left-hand menu ("bold_folder_labels": true).

Maybe some people really hate dark themes?

Re: Setting up Sublime Text 2

#117
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?

You could try the SFTP package. With it, you can mirror a remote directory locally and the package will automatically upload the change in the background. It has some other useful features for working on remote files.

http://wbond.net/sublime_packages/sftp

Re: Setting up Sublime Text 2

#118

Earlier quoted context omitted.

What's wrong with F11?

(describe-key (kbd " ")) is undefined

Only on OSX maybe? It works perfectly on Windows, not sure about Linux as I'm too lazy to reboot and test right now. Perhaps someone else can check?

Re: Setting up Sublime Text 2

#119
The TrailingSpaces plugin isn't necessary. ST2 has an option in the default preferences to trim whitespace at the end of the line - just enable it. Not to come down too hard on the article or anything, but there are many other, far better resources for setting up and learning how to be productive in ST2. This book is good https://leanpub.com/sublime-productivity (I have no affiliation with the book.)

Re: Setting up Sublime Text 2

#120
post #53

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…

What do you use to replace command-T in ST2 in Emacs? I recently picked up Emacs because I'm doing a clojure project (I can't get ST2 to work with nrepl) but I am having a hard time without the command-T fuzzy search. I have ido and find-file-in-project installed but neither of them seem to include directories in the fuzzy search. So if I search 'custcore' it won't match 'customer/core.clj'. If I instead search 'core…

Try projectile: https://github.com/bbatsov/projectile

It fills in the common project search and fuzzy filename search features(amount other things) and otherwise stays out of the way.

Post reply on HN