Skip to content

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

Closed

Description

@mofosyne

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>

Activity

  1. 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>`[/+] on Jun 11, 2024
  2. 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[/+] on Jun 11, 2024
  3. mjbvz commented on Jun 17, 2024

    @mjbvz
    Contributor

    Where are you requesting that this be supported?

  4. mofosyne commented on Jun 18, 2024

    @mofosyne
    Author

    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.

  5. mofosyne commented on Jun 18, 2024

    @mofosyne
    Author

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

  6. added
    feature-requestRequest for new features or functionality
    and removed
    info-neededIssue requires more information from poster
    on Aug 1, 2024
  7. mjbvz commented on Nov 14, 2024

    @mjbvz
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*out-of-scopePosted issue is not in scope of VS Codefeature-requestRequest for new features or functionalitymarkdown-extThe Markdown extension: language features and preview

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址