Sublime Text and the Command Line.
Sublime Text comes with an excellent little command line utility. Here are some examples of what it can do:
subl file.md: Open file.md in Sublime Text.
subl .: Open the current directory in Sublime Text.
subl file.md:line-number: Open file.md in Sublime Text and focus the line number.
Usually you have to set this up on each computer you're using Sublime on. (This sort of thing is about telling your computer how to utilize Sublime, which is why it doesn't sync to other machines when you have syncing set up.)
Windows 7/10 Sublime / Command Line Configuration
- Open the registry editor by searching for "regedit". (If the Windows Registry Editor is terrifying to you, you shouldn't do this.)
- Find this key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor.
- Create a new "String Value" with Name=AutoRun, and Data="C:\Users\[username]\autorun.bat" where username is your acutal user name.
- Create a new text file at C:\Users\[username] and name it autoexec.bat.
- Add this line to it:
doskey subl="C:\Program Files\Sublime Text 3\sublime_text.exe" $*Adjust accordingly if your Sublime Text is installed in a different location.
OSX Sublime / Command Line Configuration
- In a terminal window, do:
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /bin/sublAdjust accordingly if your Sublime Text is installed in a different location.
Tags: sublime-text tooling