Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shorten Find Results Filepath Name

Because of all the sub-directories my code typically lives in, whenever I do a Find In File for something, the code gets run off the screen because the results window has wasted so much valuable real estate by repeating the long file path for every object in my solution. More often than not, they are in the same parent directory, or I don't really care where there from.

Is there an option to shorten the path name to perhaps just the file?

Unnecessarily long

Also, the Display File Names Only option in the Find in Files dialog does not do this, it only omits the code from the result.

Find in Files Dialog

like image 468
KyleMit Avatar asked May 31 '13 15:05

KyleMit


People also ask

How do I shorten a path length file?

The simplest way to fix this is to: Substitute the folder that has a long file path with a drive letter (thereby shortening the overall character count for the files contained in the folder) Copy or move the files out of the folder into another folder that won't violate the limit.

How do I get the full path of a file in R?

If we want to check the current directory of the R script, we can use getwd( ) function. For getwd( ), no need to pass any parameters. If we run this function we will get the current working directory or current path of the R script.

How do I find the file path in Visual Studio?

Ctrl+Click or Double Right Click to Open Containing Folder, Right click to Copy Full Path. This lightweight extension lets you display the full path of the file at bottom of Visual Studio's Editor.


1 Answers

Things are different on Visual Studio 2017. You won't find the registry keys for Visual Studio 2017 anymore as Visual Studio 2017 now stores registry keys in a private binary file under %VsAppDataFolder%\privateregistry.bin.

However, according to this link, there is still a way to find and modify registry keys for Visual Studio 2017.

  • Close Visual Studio 2017
  • Open regedit
  • Select HKEY_LOCAL_MACHINE from the left bar
  • Select File > Load Hive...
  • Load the privateregistry.bin file from %localappdata%\Microsoft\VisualStudio\15.0_[instanceid]{RootSuffix}\privateregistry.bin. The RootSuffix for a normal VS installation will be blank. This is mostly used for the experimental instance
  • Name the key whatever you want (e.g. "VS2017") when prompted
  • From there, you should be able to view the entries just like any normal registry.
  • Customise it according to accepted answer's suggestions.
  • Important! Once you're finished, you need to make sure that you "Unload" the private registry, by selecting the "root" key ("VS2017" in this example) and selecting File > Unload Hive . If you don't do this, VS won't be able to read the privateregistry.bin file when it runs, causing major problems.

Update: It also works on Visual Studio 2019 (version 16.0) too.

like image 118
zagZzig Avatar answered Oct 17 '22 22:10

zagZzig