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
  • 4,674
  • 11
  • 50
  • 74

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
  • 4,674
  • 11
  • 50
  • 74
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
  • 5,984
  • 7
  • 33
  • 71