Support opening to line number in all JetBrains IDEs #454
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From iTerm's documentation:
Currently, iTerm can open to line number for IDEA, but it doesn't support any other IntelliJ editors like WebStorm, PyCharm, etc.
This PR implements support for every JetBrains IDE, since they can all handle the
--line
argument on command line.The one tricky change was:
In order to open JetBrains IDEs correctly, it's necessary to use e.g.
open -nb com.jetbrains.WebStorm --args --line 4 index.js
. Simply invoking the executable directly will result in strange errors. (Note that their official docs useopen -n
: https://www.jetbrains.com/help/pycharm/working-with-the-ide-features-from-command-line.html#toolbox)