| 
									
										
										
										
											2015-03-16 21:18:03 +00:00
										 |  |  | --- | 
					
						
							| 
									
										
										
										
											2015-09-10 02:45:52 +01:00
										 |  |  | nav: blog | 
					
						
							| 
									
										
										
										
											2015-03-16 21:18:03 +00:00
										 |  |  | title: Open Sublime Text 2 from the Mac OS X Command Line | 
					
						
							|  |  |  | slug: open-sublime-text-2-mac-os-x-command-line | 
					
						
							|  |  |  | tags: | 
					
						
							| 
									
										
										
										
											2015-06-14 03:27:41 +01:00
										 |  |  |   - sublime-text | 
					
						
							|  |  |  |   - mac-os-x | 
					
						
							|  |  |  |   - terminal | 
					
						
							| 
									
										
										
										
											2015-03-16 21:18:03 +00:00
										 |  |  | --- | 
					
						
							| 
									
										
										
										
											2015-06-18 08:58:56 +01:00
										 |  |  | {% block excerpt %} | 
					
						
							|  |  |  | How to open Sublime Text from the command line. | 
					
						
							|  |  |  | {% endblock %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% block content %} | 
					
						
							| 
									
										
										
										
											2015-03-16 21:18:03 +00:00
										 |  |  | Paste the following code into the Mac OS X Terminal, assuming that you've installed Sublime Text 2 into the /Applications folder. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-14 03:27:41 +01:00
										 |  |  |     $ ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/sublime | 
					
						
							| 
									
										
										
										
											2015-03-16 21:18:03 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | Now you can type `sublime <filename>` open a file or directory in Sublime Text, or `sublime .` to open the current directory. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-14 03:27:41 +01:00
										 |  |  | You can also type `sublime --help` to see a list of the available commands. | 
					
						
							| 
									
										
										
										
											2015-06-18 08:58:56 +01:00
										 |  |  | {% endblock %} |