I
I
Ivan Damaskin2013-11-14 01:15:56
cmd/bat
Ivan Damaskin, 2013-11-14 01:15:56

Open documents via cmd in Sublime Text 2 editor

Greetings. Tell me please.

How to correctly write on the command line so that all my editable files open in the Sublime Text 2 editor

For example, when you enter this line: $ subl Gemfile

I have a Gemfile open in Sublime Text 2 editor

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
Ivan Damaskin, 2013-11-14
@Joannes

Here is a solution for Windows users

Enter in cmd:

doskey subl="C:\Program Files\Sublime Text 2\sublime_text.exe" $*

Accordingly, the path along which the program is installed is different for each user.

M
max107, 2013-11-14
@max107

Create a symlink /usr/local/bin/sublimeleading to/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl

This is for Mac. Under other OS by analogy.

B
Bfgeshka, 2013-11-14
@Bfgeshka

If you are interested in launching by your own aliases, then you can put special launchers for this - for example, launchy, enso and the like.

A
Anton Mikhailov, 2013-12-06
@Informatikum

1. Paste before your code.
{
"cmd": ["python3.3", "~/Desktop/hello.py"]
}
print("Hello")
2. Press F7.

A
Asd_de_dust, 2014-06-02
@Asd_de_dust

I had the same question, found this answer:
1. Add the Sublime directory to the windows PATH
2. I think 'subl' is a Mac-only command. For Windows it's 'sublime_text'
To add Sublime to the PATH:
1. Right click Computer -> Properties -> Advanced System Settings -> Environment Variable
2. Under 'System Variables' select variable: Path and hit 'Edit'.
3. At the end of the 'Variable value' text field, add a semicolon and enter the Sublime Text directory (for me it was 'C:\Sublime Text 2\' but the default is C:\Program Files\Sublime Text 2 \)
4. OK, OK, OK
and then just rename the sublime_text.exe to subl.exe and you will be ready to go

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question