dennisbot / CopyRelativePathUnixStyle

A Visual Studio extension to copy relative file paths in Unix/Linux style in Visual Studio's solution explorer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Visual Studio Extension: Copy Relative-to-Solution Unix-Like File Path

This extension for Visual Studio provides a simple solution for copying a relative-to-solution unix-like file path directly from Visual Studio's solution explorer.

Download

Download the extension from Visual Studio Marketplace here. You can also look for this extension in the extension manager built-in functionality in VS.

Use Case

My workflow involves jumping over text editors (from VS to VSCode or to ST3). I need to copy a relative-to-solution unix-like file path so that I can quickly look for the same file in VSCode or ST3 using their "go to all" quick access panel.

VS doesn't have that functionality by default (there is another one that gives you the absolute path in windows format), and although I looked for extensions in their gallery, I couldn't find any (or one that for some reason didn't get installed), so I decided to create my own extension based on another project which I give credits down below.

Usage

After installing this extension you will get a new option in the context menu when you right click on any file in the solution explorer as below:

plot

You can also bind a keyboard shortcut by updating the associated command as shown below:

plot

Credits

The core logic of this extension is a slight modification of the answer provided in this Stackoverflow post. Thanks and lots of credits to the writer of the aforementioned post.

The primary logic for this extension is a modification of the solution provided by Masoud Memariani in their CopyProjectUnixPath repository. I would like to extend my sincere gratitude to Memariani for their contribution to the community.

About

A Visual Studio extension to copy relative file paths in Unix/Linux style in Visual Studio's solution explorer

License:MIT License


Languages

Language:C# 100.0%