Andrew Colclough

Web Design & Dev., Liberty, Economics, Football

Sublime Text Editor - Shell Alias for Opening dir/ or File

Edit_side_by_side_in_widescreen

So on Noonat's advice I have been checking out Sublime Text Editor as an alternate for Textmate

So far, I am very impressed - though there was one thing I absolutely missed from Textmate: The abulity to simply open any directory or file from Terminal via a shell alias:

mate dir/

Well, with Noonat's help, here is a simpe way to set one up for Sublime:

Add the following to your .bashrc file:

alias slime='open -a "/Applications/Sublime Text 2.app"'

You can name the alias (I chose "slime") whatever you want - but make sure that you point to the application and you need to have the extension .app on the end.

It is enjoyable to be able to open a repo with Sublime via:

slime /projectName

;)

Filed under  //   .bashrc   Sublime   Textmate   alias   code   programming   shell   text editor   tips