Feature request:
In Notepad++ there is a useful feature on getting file path and name data by right-clicking the file tab, much like in VSCode. However, VSCode can only copy full path to the file, while in Notepad++ there are two more options:
At least I find those options useful, in VSCode I often have to copy entire path to the file and then edit it to get a path component.
You could write an extension to do this.
Writing extension for such a small piece of code that this feature would require is an overkill. Every extension is additional work for plugin subsystem, additional maintenance, updates, etc. I'd argue that an overall cost of extension as such is worth only when delivering substantially bigger chunk of functionality than this.
I've written external tasks to do this and it's quite easy (using clip.exe on windows). Nevertheless, it would be nice to have direct support for it in vscode. Another common one I use is to copy a fully qualified class name to the clipboard. That one is very language specific obviously.
yep in Webstorm you can copy relative path which is a killer feature as when sharing a file with a team mate or pasting it into github, ticket etc I never want to copy my local path but always need the file path relative to the repo.
I'd like to extend this request to relative file path, since #46719 has been auto-closed without a resolution proving fragmentation of information in issue threads to be alive an well. Cross-copying my comment from there:
FWIW I would also like to see Copy Relative Path and an internal command next to the Copy Path one which exists on the tab context menu currently. That one should be renamed to Copy Absolute Path. This feature request is titled Copy file name, which I am not sure refers to relative files? But that I think would be the most useful.
We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines.
Happy Coding!
Most helpful comment
Writing extension for such a small piece of code that this feature would require is an overkill. Every extension is additional work for plugin subsystem, additional maintenance, updates, etc. I'd argue that an overall cost of extension as such is worth only when delivering substantially bigger chunk of functionality than this.