Skip to content

Instantly share code, notes, and snippets.

View SteveAlexander's full-sized avatar

Steve Alexander SteveAlexander

View GitHub Profile
@SteveAlexander
SteveAlexander / README.md
Created September 18, 2019 14:46 — forked from matangover/README.md
Easily open files from Python tracebacks in iTerm2 directly in your editor
  1. In iTerm2, go to Settings -> Profiles -> Advanced -> Smart Selection -> Edit
  2. Click + to add a rule with the following values:
    • Notes: Python traceback
    • Regular Expression: File "(.+)", line ([0-9]+), in .+
    • Precision: Very High
  3. Click Edit Actions... and add an action to open in your editor. For example, if you use VS Code, add an action with the following values:
    • Title: Open in VS Code
    • Action: Run Command...
  • Parameter: /usr/local/bin/code -r -g "\1":\2