Sublime Merge v2071
Machine: MacBook Pro 2021/macOS 12.3.1
My settings:
{
"theme": "Merge Dark.sublime-theme",
"editor_argument_format": "${file}:${line}",
"editor_path": "/Users/nivekmai/bin/opener",
"side_bar_layout": "locations_as_column",
"render_commit_dialog_message_at_top": true,
}
/Users/nivekmai/bin/opener
file:
#!/usr/bin/env python
import os
import sys
print("here")
with open("/Users/nivekmai/test.txt", "a") as file1:
file1.write("here\n")
if len(sys.argv) != 2:
raise Exception("Must supply file:path as argument")
pathData = sys.argv[1]
print("here2")
with open("/Users/nivekmai/test.txt", "a") as file1:
file1.write("here2\n")
if "local/project1" in pathData:
os.system('/usr/local/bin/webstorm ' + pathData)
elif "src/project2" in pathData:
os.system('/usr/local/bin/studio ' + pathData)
else:
os.system('/Users/nivekmai/bin/subl ' + pathData)
Running my opener in terminal works fine:
/Users/nivekmai/bin/opener /Users/nivekmai/code/local/project1/foo.txt:5
or
opener /Users/nivekmai/code/local/project1/foo.txt:5
Both properly open the file in webstorm, and write “here\nhere2” to ~/test.txt
.
However using right click menu and “Open in Editor” doesn’t appear to do anything, no output is logged in the console (ctrl+`) nor is the test file written to.
As a sanity check, I also attempted to set editor_path
to /usr/bin/vim
(from which vim
), and it doesn’t open in vim.
Removing the editor_path
config does properly open in Sublime Text, but it doesn’t respect my default application settings (e.g. I changed .java to open in Android Studio, double clicking in finder properly opens studio, but “Open in Editor” still opens in Sublime Text, even after restart).
Did I misconfigure something?