Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 2 Service

I'm attempting to make an open in Sublime Text 2 service via Automator.

I am doing this by:

  • Running Automator
  • Adding a new service
  • Adding "Run Shell Script"
  • Setting Shell to /bin/zsh
  • Entering a command line of: /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl -n $@
  • Setting "Service receives selected" to "files or folders"
  • Click save

Screenshot:

enter image description here

However, whenever I try to open a folder via right-click > services > "Open in Sublime", a new ST2 window is opened but with a randomly named text file (ie subl stdin N188RN.txt) and it's output is the path of the folder opened (ie: /Users/me/Desktop/project).

Screenshot:

enter image description here

Is there a way I can modify the automator command line to fix this?

like image 413
tr3online Avatar asked Jan 14 '13 19:01

tr3online


People also ask

Is Sublime Text still free?

Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use. There is currently no enforced time limit for the evaluation.

Is Sublime Text better than Vscode?

Much like VS Code, Sublime gets lots of praises when it comes to performance and customization. Some say it's the fastest text editor for writing code. Not only in general performance but also to run fast searches across any number of files. It reaches this level of performance by being very, very lightweight.

What is sublime text3?

Sublime Text 3 (ST3) is a lightweight, cross-platform code editor known for its speed, ease of use, and strong community support. It's an incredible editor right out of the box, but the real power comes from the ability to enhance its functionality using Package Control and creating custom settings.

Does sublime cost money?

In the case of Sublime Text, the app will continue working indefinitely, but you'll occasionally see a pop-up with details on how to purchase the app. If you're interested in purchasing Sublime Text, you can get a personal license for $99, or business licenses starting at $65/seat/year.


1 Answers

Try setting Pass input: value to as arguments:

enter image description here

like image 100
Riccardo Marotti Avatar answered Nov 04 '22 02:11

Riccardo Marotti