I installed Sublime Text and wanted to know how to open rb
files in it from the terminal. I saw What is the command to make Sublime Text my core editor? and I see that I can make Sublime my core editor, but I want to be able to type
sublime file.rb
How do I do this in Windows?
From build 3065 (Release Date: 29 August 2014) onwards Sublime text
includes a command line helper, nameley subl.exe
. It is at sublime's installation folder: copy it in to a folder included in the system path.
For example, in my case I copied it
from C:\Program Files\Sublime Text 3
to C:\Windows\System32
You may then use in your terminal/console subl
as a command to open whatever file, such as in your example:
subl file.rb
Or you may as well modify your system PATH
variable to include sublime's instalation folder, but I believe that is much more involved.