Last Updated: October 07, 2020
·
6.098K
· adri

ITerm2: Jump to Location in Sublime Text 2/3

Just a quick timesaver: Jump from stack traces in iTerm 2 straight to the right location in Sublime Text 3.

Click on a exeption...
Picture

And check it out in Sublime Text...
Picture

Configure iTerm 2

If you already setup your subl command, just go to your iterm 2 Preferences and paste this:

/usr/local/bin/subl \1:\2

Under Profiles > Advanced > Semantic History:
Picture

Happy coding!!

4 Responses
Add your response

awesome tip, it does work when the stack has file:line but for some reason javacript is file:line:column and iterm fails there. do you know any workarround to that?

over 1 year ago ·

Really great timesaver, thank you!

over 1 year ago ·

@jfromaniello
Yes you can parse the location information manually like Fabbi did for python error messages, please see on reddit:
http://www.reddit.com/r/SublimeText/comments/1kanze/iterm2_jump_to_location_in_sublime_text_23/

Unfortunately I'm pretty busy right know, otherwise I would probably start a shell script which automatically determines if it's a javascript/python/php or any other (images/...) file and opens it in the right app. Maybe I'll get to it in a week...

over 1 year ago ·

In my current build version 3, it's possible to select 'Open with Editor' instead of 'Always run command' and then choose Sublime 3/2 as option

over 1 year ago ·