
b or -background: Don't activate the application w or -wait: Wait for the files to be closed before returning a or -add: Add folders to the current window Or: subl - Edit files that may start with '-' The available flags will vary per operating system – the following example is from a Mac. To see the available flags, run subl -help. Most default PATH environment variable values should contain /usr/local/bin, so no further commands should be necessary. The exact details of the symlink command will depend on the installation location. Sudo ln -s /opt/sublime_text/sublime_text /usr/local/bin/subl If installing from a tarball, the sublime_text executable should be symlinked to subl, with a command such as:

If Sublime Text is installed via one of the Linux Package Manager Repositories or a package, a subl symlink will automatically be installed into the /usr/bin/ directory. If using Zsh, the default starting with macOS 10.15, the following command will add the bin folder to the PATH environment variable:Įcho 'export PATH="/Applications/Sublime Text.app/Contents/SharedSupport/bin:$PATH"' > ~/.zprofile If using Bash, the default before macOS 10.15, the following command will add the bin folder to the PATH environment variable:Įcho 'export PATH="/Applications/Sublime Text.app/Contents/SharedSupport/bin:$PATH"' > ~/.bash_profile For a typical installation of Sublime Text, this will be located at /Applications/Sublime Text.app/Contents/SharedSupport/bin. To use subl, the Sublime Text bin folder needs to be added to the path.
#OPEN SUBLIME TEXT 3 FROM TERMINAL WINDOWS#
#OPEN SUBLIME TEXT 3 FROM TERMINAL WINDOWS 8#
sublime myprojectĮnjoy the benefits of some focused productivity! Be on the look out for future workflow tips in the coming weeks.Show instructions for: Windows 10, Windows 8 Now you should be able to use the sublime command to open up files and folders from the command line. bash_profileĪlias sublime="open -a /Applications/Sublime\ Text.app"

After that, we just need to add one line to your. If Sublime Text opens, all is good with your setup. If you run the following command, it should open up Sublime Text: open -a /Applications/Sublime\ Text.app Sublime Text Made Easyįirst, make sure that everything is set up correctly. It turns out it was very easy with a few commands. I’ve seen a lot of people use a handy terminal shortcut to open up files and folders in Sublime Text, so I finally decided to set this up. So, the longer we can remain in a single context, the more productive we can be. Just like in computer processing, context switching is costly for humans as well. This is something I’m going to call context switching, which has an actual definition in computer science, but for this purpose we can consider it any action that makes you switch contexts: going from one application to another, switching from typing to using the mouse, etc. So, in a few keystrokes, I’ve got my project folder and assets created and hooked up with Git, but from here I have to open the folder in Sublime Text by either dragging the folder to the application icon in the dock or opening the app and using the menus. For example, when creating a new project or prototype, you might do something like this: cd desktop

Once you start doing stuff in the command line, it becomes awkward to have to jump between typing commands and using the mouse and GUI to do things in concert. So, in an effort to work smarter around development efforts, I’m going to capture a bunch of small tips, tricks, shortcuts, and tools that should help me (and other people) develop smarter workflows. I think I’ve been there for awhile now, but it just took some time to realize that. That philosophy has served me well, but eventually you reach the upper limit of what you can do with this methodology. When there are tons of things to do, just work harder.

This post is the first in what will hopefully be a weekly tip or trick focused on workflow since I think many of these things can be helpful across the board for a lot of folks.įor a long time, I feel like I’ve relied too heavily on brute force to get a lot done. Septem| Posted in Web Development, Workflow
