iTerm2 has a little known feature that lets you open a file in your favorite editor simply by clicking on a file name in the terminal.
This also works with folders (they'll open in Finder) ā and it is a super handy feature if you're running your Python tests from the command line. I use it all the time to click and jump to failed test cases with the Pytest test runner, for example.
(This feature should be completely language agnostic by the way. So you'll be able to use it with any test runner or language.)
The feature is called "Semantic History" and configuring it will let you Cmd+Click on any file or folder name to open it from the terminal.
Watch the video to learn how to set everything up :)
* * *
Shameless plug: If you want to get a Sublime Text setup just like the one in the video then check out my Sublime Text Setup Guide for Python Developers: https://SublimeTextPython.com/ š
āŗ Weekly Tips for Python Developers: https://dbader.org/newsletter
6 Comments