0

I would like to set up my iterm2 to open hyperlink file to pycharm on my mac. With default setting of iterm2, file is open by Xcode App and do some research online from this post open-file-on-intellij-from-iterm-2 and set up my iterm2 from Preferences/Profiles/Advanced/Semantic History -> Run command -> /usr/local/bin/charm \1 --line \2 or /Applications/PyCharm.app/Contents/MacOS/pycharm \1 --line \2. Neither of them works. How I can open file in Pycharm with a command + click in iterm2?

jacobcan118
  • 7,797
  • 12
  • 50
  • 95

1 Answers1

0

I was looking for the same thing in RubyMine. Turns out I just needed to associate .rb files with RubyMine in the Finder. No changes to iTerm config were needed.

Pick any .py file in Finder, and do Get Info (cmd-i) on the file. Under 'Open with:' pick PyCharm. You might have to first select 'Other...' and then you can pick PyCharm. Under that dropdown menu is a button that says 'Change All...', use that to associate all .py files, not just the one you initially selected.

Works like a charm (no pun intended) in RubyMine. The particular file I tried to open was already contained in a project that RM had opened, so it focused that project window, and opened that file.