Creating a Terminal Shortcut for SubLime

At a recent programming (nerd) conference, I got to see the SubLime text editor in action and I liked what I had seen.  I have been a loyal user of TextMate, but I like some of the shortcut keys and the look and feel of SubLime.  The one issue I ran into immediately with SubLime was the opening of a project from Terminal.  Not a big deal, but I am always using git to get the latest code prior to opening the project, so it is very natural for me to want to use the keyboard to open up the editor.  There is a very simple fix that I thought I would share to handle this issue.  I used the unix 'ln' command to link the application to the command 'subl'.  This is easy enough once you know where the command resides within the application package.  The following syntax can be ran from the Terminal screen to create an alias to open projects up within Terminal.  Notice the backslashes to identify the spaces in the path.  Happy coding!

sudo ln -s /Applications/Sublime Text /bin/subl



Comments are closed.