News for hackers. Stuff that matters.
Re:A new syntax definition format for Sublime by sebular on Wednesday April 08, 2015 @03:23PM (#9343197)
Nice! I just returned to Sublime after getting fed up with Atom's performance and stability issues, and I can't believe it took me this long to switch back.

One thing that bothers me, maybe more than it should-- On OS X, I like opening directories for editing by using the open command:

open [folder] -a Sublime\ Text

This is great, but I hate that Sublime Text has a long, two-word name, requiring me to escape the space or use quotes (it was even worse when I had to type Sublime\ Text\ 2).

I've tried aliasing and symlinking "sublime" as a shortcut, but since the open command uses Launch Services to find the application name, none of that shell trickery works. This is the only thing preventing complete text editor zen :(

Re:A new syntax definition format for Sublime by slig on Wednesday April 08, 2015 @03:24PM (#9343220)
Have you tried this? https://www.sublimetext.com/docs/2/osx_command_line.html Works flawlessly here on Sublime 3 on OS X 10.10.

And then

    $ subl .
to open the current folder.
Re:A new syntax definition format for Sublime by sebular on Wednesday April 08, 2015 @03:36PM (#9343303)
Ha! After complaining I figured I'd give one more shot at solving this and I came across that same technique. Then I came back here to update my post and of course people were already giving me that advice.

Zen achieved.

Re:A new syntax definition format for Sublime by psychometry on Wednesday April 08, 2015 @06:50PM (#9344663)
Further zen can be achieved by aliasing `e` to `subl`.
Re:A new syntax definition format for Sublime by maemre on Wednesday April 08, 2015 @08:31PM (#9345096)
I have a personal setup like that:

* e is aliased to `emacs` (I use Emacs on command line and Sublime Text using a GUI and projects, so I use `subl` command rarely). * g is aliased to `git`. * z is a glorious cd command: https://github.com/rupa/z

Besides them I use `rsub` command when editing files on a remote server, which is `rmate` for Sublime Text.

Tip for zsh users: With zsh's history-beginning-search-* commands I can write only a prefix to find a command in history. E.g. If I already typed `rsub user_management/forms.py` before and want to open that file, I type `rsub u` and press up arrow a few times till I get to the result I want.

Re:A new syntax definition format for Sublime by kbd on Wednesday April 08, 2015 @06:37PM (#9344585)
Just associate .txt files with Sublime Text and then you can type 'open -t {file}' or 'open -t {directory}' to open in Sublime Text. I'll often do 'open -t .' to open the current directory, then CMD+P to open any file in the directory hierarchy.
Re:A new syntax definition format for Sublime by skj on Wednesday April 08, 2015 @09:52PM (#9345403)

  function open_st2 {
    open $1 -a Sublime\ Text
  }
Re:A new syntax definition format for Sublime by raziel2p on Wednesday April 08, 2015 @03:26PM (#9343245)
Might be a version 3 thing, but I can just type subl [folder].