iTerm command click to open with Atom

Inside Atom, go to the Atom menu and choose Install Shell Commands. This ensures you can call Atom from iTerm.

In that same iTerm preferences screen, change the first select list to Run command... and paste the following into the text field that appears: /usr/local/bin/atom -n \1:\2. That tells the atom command line tool to open the clicked file (\1) at the line number specified (\2).


(I use this one. For some reason the iTerm option "Open with default app" doesn't work, but the command "$ open whatever" works like a charm, so I've just set that command.

enter image description here

Tags:

Macos

Iterm2