Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to paste a file path with line number to go to line in file #123810

Closed
mateja176 opened this issue May 13, 2021 · 5 comments
Closed

Allow to paste a file path with line number to go to line in file #123810

mateja176 opened this issue May 13, 2021 · 5 comments
Labels
feature-request Request for new features or functionality info-needed Issue requires more information from poster quick-open Quick-open issues (search, commands)

Comments

@mateja176
Copy link

I often find myself needing to point another developer to a specific line in a file. Usually, I would approach this by sending them a relative file path along with the line number. For example:

  • relative file path src/utils.js
  • line number 30

Equipped with this information they could:

  • copy the file path their clipboard
  • raise VSCode
  • execute Go to file command (usually bound to ctrl+e)
  • paste
  • press Enter
  • execute Go to Line/Column command (in my case it is bound to ctrl+g)
  • type in the line number

Instead it would be convenient if the Go to file command input could accept a path with a symbol simplifying the above steps. Alternatively, to avoid overloading Go to file a new command my be introduced, possibly named Go to line in file.

The syntax for the enhanced file path could be filePath:lineNumber. In the context of the example above: src/utils.js:30.

@vscodebot
Copy link

vscodebot bot commented May 13, 2021

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@chrmarti chrmarti assigned bpasero and unassigned chrmarti May 18, 2021
@bpasero bpasero added feature-request Request for new features or functionality quick-open Quick-open issues (search, commands) labels May 18, 2021
@bpasero bpasero removed their assignment May 18, 2021
@bpasero bpasero changed the title Go To Line In File Allow to paste a file path with line number to go to line in file May 18, 2021
@mateja176
Copy link
Author

This comment also applies here.

@bpasero bpasero added this to the Backlog Candidates milestone Sep 30, 2021
@bpasero
Copy link
Member

bpasero commented Sep 30, 2021

We already support this, no?

@bpasero bpasero added the info-needed Issue requires more information from poster label Sep 30, 2021
@TylerLeonhardt
Copy link
Member

Yes we already support this:

  • Ctrl + P
  • utils.js:30

Works

@github-actions github-actions bot locked and limited conversation to collaborators Nov 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality info-needed Issue requires more information from poster quick-open Quick-open issues (search, commands)
Projects
None yet
Development

No branches or pull requests

5 participants
@bpasero @TylerLeonhardt @chrmarti @mateja176 and others