Live data from Hacker News

Some things beginners might not know about Sublime Text

blog.alainmeier.com

71–80 of 116 posts

Re: Some things beginners might not know about Sublime Text

#71
post #25
post #15

Cmd + d selects the current word. Subsequent Cmd + d presses will select the following instance of the word for editing. Makes it easy to do things such as renaming a local variable or changing both the opening and closing element of a HTML tag.

What's really wild is if you do CMD+d several times and then move around with the arrow keys. Multiple cursors follow you around. I'm not sure if this is useful, but it's certainly cool.

Way useful. You can, for example, select all instances of a variable name, then rename it selectively from the middle of the selection if you want.

Also good to note: Command-F find also has a "Find All" option which can be faster than pressing Command-D multiple times, and also allows more complex non-word and regexp searches. From there you can use multiple cursors or replace the whole selection just by typing.

Brilliant editor, this one.

Re: Some things beginners might not know about Sublime Text

#72

You guys know that you can go to the Default Keymaps file and get all of these tips in one list right? You can even change them... EDIT: Just for fun, here is that file on OS X: https://gist.github.com/3117613 Notice the "context" definitions. Also check out how the auto-pairing functionality is defined in terms of the key binding DSL. And how you can define nonstandard layouts for the panes. And so on. Sublime is gr…

Thanks for that. Off topic: Safari on iPhone cuts off every line short at your link...I'm surprised by github!

Re: Some things beginners might not know about Sublime Text

#73

I am pretty sure that "Quick file opening" is CTRL+P on Windows. Since CTRL+T opens a new tab for me..

Yep. Basically, Textmate's Goto Anything feature is activated by cmd+t, so ST's author mapped both cmd+t and cmd+p to Goto Anything on OS X to accommodate people switching over. On OS X, Goto Symbol is actually cmd+r.

I set cmd+t for goto anything and cmd+p for command palette.

Re: Some things beginners might not know about Sublime Text

#74
post #66

Earlier quoted context omitted.

Installation is through the Sublime Text 2 console. This is accessed via the ctrl+` shortcut. Once open, paste the following command into the console: import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.ur…

Um, this is product for developers. I think that they should be able to handle a pretty simple copy/paste. Not sure the reason behind the drama queenery.

If it's worth doing, it's worth doing right. Respect others and they will respect your work.

Re: Some things beginners might not know about Sublime Text

#75

I tried out Sublime for a day or two, and think it does a lot of things right. However a few small things also bugged me right off the bat, may be someone can help. - Code folding: No fold level 1 option, would like a hotkey. No line at the fold, just an icon at end of line. - No GUI for options or syntax/theme editing. I give geany a pass on this (has options but not theme editing) because it is free. Many other fre…

> This might be because they made their own widget set and haven't finished yet. If so, it was a mistake. I don't understand how anyone who has actually used Sublime can say this. It's smooth, clean, cross-platform identical, and beautiful, and most importantly, insanely fast. I believe the widget set is their biggest strength. Then again, I also believe the text configuration is another strength. It's a programmer's…

I didn't say it shouldn't be saved to disk as text. I gave three editors which have gui configs as well and are free. The gui can be built automatically if done right.

Also, I have no performance issues with any of my editors. The widget comment was based on the fact they use no other widgets, they must not have written them yet.

Re: Some things beginners might not know about Sublime Text

#76
post #8

Also a must-have: Sublime Package Control http://wbond.net/sublime_packages/package_control Useful for installing things like themes, syntax awareness, code linters, etc...

Installation is through the Sublime Text 2 console. This is accessed via the ctrl+` shortcut. Once open, paste the following command into the console: import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.ur…

Yeah, that's convenient. The alternative is to go in there and copy the package yourself. Enjoy. Of course, other people have better things to do.

Re: Some things beginners might not know about Sublime Text

#79

Earlier quoted context omitted.

Installation is through the Sublime Text 2 console. This is accessed via the ctrl+` shortcut. Once open, paste the following command into the console: import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.ur…

Who cares if it is "professional" or not? It works, and you do it once after you install the editor and never do it again. Oh yeah, and it was created for free by someone not associated with the product and is awesome.

I'm right there with you, I agree completely. Not to get pedantic but when I read "who cares if it's professional or not" I kind of cringed. I mean, professionalism is important no matter what. And I think professionalism is the wrong word to describe this. I think what we're talking about here is more a matter of doing things "the right way" which isn't always the same as professional. So I can definitely see the argument for wanting it done the right way but at the same time there's no reason to go on a crusade for everything to be done perfectly. Sometimes just being done reasonably and working is enough. In this case just working certainly is enough. It's reasonable to give this one a pass on "professionalism".
Post reply on HN