Simple copy path with line number

We have ~15 projects, and often use paths like here:

  • <path to file>:<line>, example path1/path2/file.php:123 or
  • <project>/<path to file>:<line>, example project1/path1/path2/file.php:123

To do this need always do "copy reference" and add line number.

After hundred manipulation as this, this little problem very bother.

May be this little function exists? (google not helped)

Thanks.

3 comments
Comment actions Permalink

'Copy reference' in line right-click menu copies file path plus line number, like 'src/js/test.ts:4';
See https://youtrack.jetbrains.com/issue/IDEA-88299#comment=27-353148

0
Comment actions Permalink

It seems though that you need to right-click on a empty part of the line, else you get a reference to the object that was clicked upon.

 

0
Comment actions Permalink

@Mvermand

It seems though that you need to right-click on a empty part of the line, else you get a reference to the object that was clicked upon.

Correct. That's because that action is content dependant: will copy the reference based on what is under the caret. It will also work when invoked on a file in the Project View panel or alike.

0

Please sign in to leave a comment.