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

Feature Request: <filename>:@<symbol> Syntax to allow for jumping directly to file and symbol at the same time #214870

Closed
mofosyne opened this issue Jun 11, 2024 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality markdown Markdown support issues *out-of-scope Posted issue is not in scope of VS Code

Comments

@mofosyne
Copy link

mofosyne commented Jun 11, 2024

I do some documentation occasionally and found that using line number to be a bit inflexible when the code evolve that the line reference is no longer accurate.

Currently we can do <file>:<linenumber> but what would be nice is if you can also do <file>:<symbol>

I noticed you can do @<symbol> so if you are worrying about conflicting syntax, you could consider <file>:@<symbol>...

So you may type gguf.c:@gguf_context to jump to gguf.c and locate the closest symbol matching gguf_context.


Extra consideraton. Perhaps you can chain both the line number and symbol so that it will pick the symbol closest to the line number (this is still okay as long as there is not too much line number deviation...) <file>:<line>:@<symbol>

@mofosyne mofosyne changed the title Feature Request: Syntax to allow for jumping directly to file and symbol at the same time Feature Request: Syntax to allow for jumping directly to file and symbol at the same time <filename>:@<symbol> Jun 11, 2024
@Tyriar Tyriar added the markdown Markdown support issues label Jun 11, 2024
@Tyriar Tyriar assigned mjbvz and unassigned Tyriar Jun 11, 2024
@mofosyne mofosyne changed the title Feature Request: Syntax to allow for jumping directly to file and symbol at the same time <filename>:@<symbol> Feature Request: <filename>:@<symbol> Syntax to allow for jumping directly to file and symbol at the same time Jun 11, 2024
@mjbvz
Copy link
Collaborator

mjbvz commented Jun 17, 2024

Where are you requesting that this be supported?

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Jun 17, 2024
@mofosyne
Copy link
Author

mofosyne commented Jun 18, 2024

I would like it to be in Command Palette. e.g. ctrl+p then search for filename then symbol

When sharing a reference between people I typically send file:num to others etc... with this new approach i can also send file:symbolname instead and tell them to throw it in the same command pallet where they would usually paste the file and line number.

@mofosyne
Copy link
Author

Ideally see if you can make these search syntax composable so you can join it together etc...

@mjbvz mjbvz added feature-request Request for new features or functionality and removed info-needed Issue requires more information from poster labels Aug 1, 2024
@mjbvz
Copy link
Collaborator

mjbvz commented Nov 14, 2024

Closing this based on lack of additional feedback/upvotes since it was opened

@mjbvz mjbvz closed this as completed Nov 14, 2024
@mjbvz mjbvz added the *out-of-scope Posted issue is not in scope of VS Code label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality markdown Markdown support issues *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests

4 participants