0

Quick Question ! I want to change settings to open python files by default using Sublime Text when I open it from terminal.

$macbook: Open HelloWorld.py

It would be opened directly on Sublime Text without using vim to edit the files.

user3378649
  • 5,154
  • 14
  • 52
  • 76

2 Answers2

4

I linked it : ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

then run the command this way :

subl HelloWorld.py
user3378649
  • 5,154
  • 14
  • 52
  • 76
1

First create a symlink to Sublime then use it to open a file. Assuming your symlink is sublime it would be something like this:

sublime HelloWorld.py

More information here and here

hanleyhansen
  • 6,304
  • 8
  • 37
  • 73