Live data from Hacker News

Some things beginners might not know about Sublime Text

blog.alainmeier.com

61–70 of 116 posts

Re: Some things beginners might not know about Sublime Text

#61
post #44

Earlier quoted context omitted.

I normally do Cmd+N (Create an empty file) Cmd+S (save it). Isn't this sort of the same?

But then syntax highlighting is off until you close and reload it, which is annoying. I usually have a terminal open to the project anyway so I just use 'touch' to create the file I want.

By default, the appropriate syntax highlighting will be set on the file the first time it gets saved.

Re: Some things beginners might not know about Sublime Text

#62
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 free choices have this (N++, Programer's Ed.) but not Sublime. I don't wanna dig through docs for hours (again) to get another editor set up. It's a shame this stuff isn't standardized by now.

This might be because they made their own widget set and haven't finished yet. If so, it was a mistake. QT, wx, or native would have been fine. No need to reinvent the wheel.

Configuration: The mess of weird filenames and extensions in the config folder was a turnoff also. Json is nicer in many respects than xml, but I can't say it's optimal for config files.

Re: Some things beginners might not know about Sublime Text

#63

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…

There's also an app on the Mac app store--I think it's called Cheat Sheet (?)--where you hold Command to see all the hot keys for the program.

Re: Some things beginners might not know about Sublime Text

#64
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.urlopen('http://sublime.wbon
    d.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime
    Text to finish installation'
Are you kidding me? The product or package maintainer should handle this better.

Re: Some things beginners might not know about Sublime Text

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

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.

Re: Some things beginners might not know about Sublime Text

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

Hey, we're programmers here. When the entire install command fits in one line of Python, and I can read it, I freaking love seeing the entire thing and running it in the interpreter myself. I have -1 problems with this.

Plus it's easy as pie, and as anyone who's actually used Package Control knows, it would be worth it if you had to pluck a hair from an Argentinian llama and place it in your USB port while reciting the gregorian chant from Monty Python and the Holy Grail to install it. One line of actual Python is simply a convenient shortcut.

Re: Some things beginners might not know about Sublime Text

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

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.

Re: Some things beginners might not know about Sublime Text

#69

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 editor; it wasn't designed this way out of laziness or poor aesthetic or UI concepts, it was designed this way because it's exactly how most of the target users want to configure it. It also saves a lot of dev time that would be spent maintaining myriad settings UI's and determining which belong and which don't and how to lay them out and how to document them, etc. etc. etc. Instead, settings are keys and the way you manage them is through simple, readable JSON files. No problem.

It also has many other advantages, such as being able to have a settings file per project and override any settings as you like, rather than being limited by a pesky UI.

In fact, it would probably be a fairly easy thing to set up a Sublime plugin that provides a UI for the various settings as you desire. The fact that no one has bothered to do this yet is very telling.

Re: Some things beginners might not know about Sublime Text

#70
post #38

I've been using {g}vi{m} for 20 years now, but just bought ST2. I like how this whole discussion revolves around finding keystrokes in ST2 that yield the convenience of doing things I took for granted in vim. Maybe I should just yield to the wisdom of the crowd, go back to VIM, forget about having a file explorer on the left side (NERDtree's wonkiness drove me to ST2), and learn to use Ctrl-P. It's what people keep s…

What functionality are you looking for? I usually use :new|n ,which is usually :new|n.
Post reply on HN