Skip to content

Allow to paste a file path with symbol to go to symbol in file #123809

Closed
@mateja176

Description

@mateja176

I often find myself needing to point another developer to a specific function or other symbol, which is frequently located in a file containing numerous other definitions. Usually, I would approach this by sending them a relative file path along with the symbol name. For example:

  • relative file path src/utils.js
  • symbol name capitalize

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 symbol command (in my case it is bound to ctrl+shift+o)
  • type in the before mentioned symbol name

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, for example Go to symbol in file.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    editor-symbolsdefinitions, declarations, referencesfeature-requestRequest for new features or functionalityquick-openQuick-open issues (search, commands)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions