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

copy the exact path from the new breadcrumbs #58678

Open
alighali85 opened this issue Sep 14, 2018 · 21 comments
Open

copy the exact path from the new breadcrumbs #58678

alighali85 opened this issue Sep 14, 2018 · 21 comments
Assignees
Labels
breadcrumbs feature-request Request for new features or functionality
Milestone

Comments

@alighali85
Copy link

alighali85 commented Sep 14, 2018

It would be really great if we can copy and share the breadcrumbs generated a
path, so we can save a huge time when we work as a team, as we can refer to the exact point of (issue or function) we need to work on next

screen shot 2018-09-14 at 10 45 22 am

@jrieken jrieken added feature-request Request for new features or functionality breadcrumbs labels Sep 17, 2018
@jrieken jrieken added this to the Backlog milestone Jan 13, 2020
@ldsands
Copy link

ldsands commented Mar 24, 2020

Sorry for the question but I figure this is as good of place as any, I've been doing a lot of web scraping lately and now I have to extract content. This feature would be very useful for that.

So now to my actual question. Does being added to the backlog mean that it is getting close(ish) to being actively worked on?

Thank you for your time and for your work on this increadible editor! 👍

@alighali85
Copy link
Author

@ldsands usually in Agile teams, having it in the backlog means it will be scheduled to start working on it, but when they will start actively working on it still matter of ordering the priorities for the team. the only way to figure that out (form outside) if we could see the milestone they put for the next release I think.

@davetapley
Copy link

A couple other use cases:

  1. Copy JSON path (maybe as xpath) [Feature Request] Copy breadcrumb path #71453
  2. Running single tests with Python's unittest: https://stackoverflow.com/a/26531790/21115

@clebergriff
Copy link

I upvote this issue for Running single tests with Python's unittest as stated by @davetapley
Is it possible to create an extension for this matter? If so, is there any guide that could help me doing this?

@Kilozen
Copy link

Kilozen commented Sep 14, 2022

Yes! This would be extremely helpful for communications and documentation. It's basically a "deep link" reference to anywhere in a project.
I keep expecting to be able to right click on the breadcrumbs / path and say "Copy as Path". Then I spend about 10 minutes clicking around, looking for every possible way to do this expected behavior before giving up and typing the 200 character path by hand (with undetected typos).

I would think this should be easy to implement... the path is obviously already available and the breadcrumb display already responds to being clicked on, so there must be an existing handler...

(fyi, there is some discussion of this on stackoverflow:
https://stackoverflow.com/questions/59653826/how-to-access-the-text-of-vscode-breadcrumb-from-extension )

@SaberStrat
Copy link

SaberStrat commented Dec 8, 2022

I can get the relative or absolute file paths from the Explorer view of course. But this requires scrolling to the ancestor folder I want the path to at that moment.
Being able to right click on any element of the breakcrumb and copy a relative or absolute path to that file (or even function) would be a neat time and focus safer!

@Pithikos
Copy link

Pithikos commented Dec 8, 2022

At a minimum a simple Right Click > "Copy path" should exist. I really don't understand why such a basic functionality is not there yet.

In Atom this existed by the get go.

@R35007
Copy link

R35007 commented Dec 10, 2022

This issue has been there for a very long period of time. Is there any update on this ticket. This is a very needed feature. There aren't any extensions of this. It would be great if we at least get extension api support so that we can build an extension for it.

@namugach
Copy link

Is it that hard to add one of these?
document.getElementsByClassName("tabs-breadcrumbs")[0].innerText.replaceAll("\n", " > ")

@Pithikos
Copy link

Pithikos commented Feb 23, 2023

Any updates on this so we can just copy/paste instead of writing 200 characters each time as someone mentioned?

Closest thing I found is https://github.com/yoshinorin/vscode-current-file-path-extension but lacks copying on click

@richex-cn
Copy link

I found a VS Code extension copy-json-path that can copy JSON paths.

This was referenced Mar 14, 2023
namugach added a commit to namugach/vscode that referenced this issue Mar 14, 2023
Mouse
- Full: Ctrl + Right down
- Focus: Right down

Hot key
- Full: Ctrl + Alt + C
- Focus: Ctrl + Alt + C (While focusing on the breadcrumbs)

Separator Option
- default: " > "
@Trikenstein
Copy link

Please also have a look at #179531 which has more screenshots to better illustrate the feature request.

@antoniojesusA9
Copy link

You can try this:
https://marketplace.visualstudio.com/items?itemName=scott-blair.copy-breadcrumbs

@zardoy
Copy link
Contributor

zardoy commented Jun 9, 2023

@antoniojesusA9 This one also has desired functionality with Copy Current Outline Path command: Outline Utils it actually copies current outline path in the document and supports custom delimeter. For example with the body of the issue it would be OwnProps>match

@Trikenstein
Copy link

Trikenstein commented Jun 11, 2023

Sorry to insist, VSCode is reaching a status of an IDE and is not a simple text editor. Copy the path of a YAML of JSON element from the breadcrumbs bar is something basic that should be a built-in functionality. In the duplicated issue #179531 I had filed, I provide clear screenshots showing this feature exists in IntelliJ since +10 years.

Thanks for participants who suggest to install some extension to work around the missing feature in VSCode. For now it is much simpler for me to drag-drop the YAML/JSON file into IntelliJ and copy the key from the breadcrumbs bar.

@zardoy
Copy link
Contributor

zardoy commented Jun 12, 2023

For now it is much simpler for me to drag-drop the YAML/JSON file into IntelliJ and copy the key from the breadcrumbs bar.

@Trikenstein The key feature of VS Code is extensibility and I think vscode is just nothing without its extension ecosystem. I'm not saying that this feature shouldnt be delivered out of the box, there is a PR and everyone would be happy to have it. I'm just saying that vscode definitely lacks a lot of copy something commands, AFAIK vscode provides only copy file path and copy some code commands, but there is still no useful actions such as: Copy Workspace Name/Path, Copy Line/Column Number, Copy Current Word Range, Copy Diagnostic Message, Copy Hover Text, Copy Signature Help, Copy Tree Item Text, Copy Inlay Hint, Copy Focused Completion Name and so on... Also it seems to be missing some other useful breadcrumbs/outline commands such as Select Last Breadcrumb Range (ext: Select Outline Item) - can be useful to quickly copy code or find some text withint it. Also copy the last breadcrumb name can be useful to quickly insert the name of currently focused function for example. Hopefully all of these actions are possible with extensions today.

@Trikenstein
Copy link

@zardoy A billion years ago, mother nature was facing the same issue. Every animal was asking for legs. Some sheeps asked for 2 legs on the ground 3 legs pointing towards the sky. Some horses asked for 4 legs inline, other asks for sideway legs, etc. Contrary to VSCode, mother nature satisfied all the requests. Fast forward today, the animals which remain are those who are efficient, having the most efficient legs configuration.

Here we attempt to save the VSCode maintainers a billion years of debate and wondering. The feature request here is the one that makes sense. The breadcrumb bar is visible on the screen. It is intuitive to get the path from that visual clue. Whether it's a file path or a YAML, JSON path.

@zardoy
Copy link
Contributor

zardoy commented Jun 17, 2023

Interesting. Also I fully agree with you, this context menu would make it super intuitive m

@liuxhit
Copy link

liuxhit commented Jun 26, 2023

You can try this: https://marketplace.visualstudio.com/items?itemName=scott-blair.copy-breadcrumbs

Wonderful plugin!

@V1NAY8
Copy link

V1NAY8 commented Sep 13, 2023

So, Are we getting this useful feature ? ? ?

@s-h-a-d-o-w
Copy link

Hm, I don't see any official approval that this should be implemented, so maybe posting my implementation won't be interesting but... anyway, here's what it could look like 😅: https://github.com/s-h-a-d-o-w/vscode/tree/copy-breadcrumbs-path

Screenshot 2023-09-23 231727

(This was my first time working with the codebase, so things might not be ideal...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breadcrumbs feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests