How can I look for both folders and files in VS Code? - ide

I come from JetBrains, and when I want to look for a folder or a file, I simply press Ctrl + Shift + N:
Look for a folder:
Look for a file:
In JetBrains, after selecting a folder, the explorer navigates to it.
Now, in Visual Studio Code, when I look for a file, I'm using Ctrl + P. But it seems like I can't look for a folder.
I found a partial solution that can look for folders in the project explorer Ctrl + E but it doesn't seems to work completely.
Is there a way to tell VS Code to include folders in the searchbox?

No, but there are 2 alternatives you might be interested in.
Mini Search in Explorer, By pressing / in Explorer, then type search text (Only works with expanded folders)
Reveal in Explorer, By opening a file in search results, Shift+Alt+R reveals folder structure in Explorer.

Related

PhpED How to jump in an instance to Favourite File

I have a file in my project I frequently need to open, and I am forever looking for it. OK, I can usually find it via Ctrl + Tab (as it was recently accessed) or via the drop-down menu right of the file tabs, or via Ctrl + Shift + N to search for the file by name, but all of these take too long.
A Global bookmark would be awesome or a 'favourite files' tab I could float... does anything like that exist? I tried floating the file itself as well as adding it to a 'New Tab Group' (both can be done by right-clicking the file tab), but both of these options take up valuable space - you cannot have the file auto-hide in the way unpinned tabs do.
Does anyone have a trick up their sleeve?
It's a little on the nose and not the perfect "global bookmark" solution sought, but renaming the file so that it appears at the top of the drop-down tab list is half a solution. The file is still two clicks away - one would be better.

IntelliJ IDEA: how to search for a folder / directory / package name?

I wish to search just directory (folder) names and packages within the modules of my current project.
How can I do this?
CTRL+Shift+N allows me to find a
class
CTRL+Shift+Alt+N allows
me to find a symbol
Is there a function for that allows me to search just directories, folders and package names?
I'd like the result of this search to be that the directory / package sought is highlighted in the "Project" box.
For example, if I type in "model.feed" then then I get this:
and preferably while I'm typing that a list of any directories matching would be shown in real time (in the same way as classes are when you do CTRL+Shift+N).
I'm using IntelliJ IDEA 12.0.4 (Ultimate).
In IntelliJ IDEA 13, you can use Goto File (Ctrl+Shift+N) and enter the directory/package name with a slash afterwards. Then you'll see all the matching directories in your project.
I propose this as a partial solution to your query.
The following steps will allow you to find a file or directory or package name or jar name that is visible in the project view.
Caveats stated explicitly below, but give this a go.
Click on the root folder in the Project View.
Start typing words that you want to search on to find packages/files/folders/jars in the project view
A tool tip will appear that contains the text Search For: along with the text that you have
entered.
The Project View will then highlight the first folder or file that matches the text that you have entered.
This may be close to what you are looking for.
The only caveat is that this search is constrained to those entities currently visible in the Project View so if you want to search a particular part of the project it appears that you have to expand those folder within the Project View. (From my testing of this in IntelliJ Ultimate Version 11.)
One way to work around this is to go to the root element in your project. Perform a partial traversal of where you want to go then by pressing enter you open the folder that you have landed on and then that search is completed.
Starting typing text again after pressing Enter will recommence the search from the current item in the Project View.
So by experimenting with this feature you can interactively walk around your project in the Project View in a dialog-box-free manner.
As a side note you can use the letters Camel Case style to traverse and find classes in the ProjectView
WINDOWS:
CTRL + SHIFT + N
MACOS:
⌘ command + ⇧ shift + O
If you try
CTRL + SHIFT + F
You can do a global file search (like eclipse CTRL + H).
In the file search, you can select which folder to search for, what file type to search for, case sensitive etc, all the normal stuff.
Global Replace is
CTRL + SHIFT + R
(Mac replace CTRL for CMD)
On mac it is
CMD + Shift + O
at least for intellij 14.1
If you have the file open in the editor and can't figure out the location in the project view
WINDOWS:
ALT + F1
From Select In... pick the first item, Project View
It seems IntelliJ doesn't directly support this. Here are the best alternatives I've thought of so far:
I suggest these steps if there is nothing in the folder yet (Windows):
Windows:
Right click on the project root, and choose "show in explorer"
In the search box on the top right, search for the folder you want (e.g. META-INF)
Right click, "open folder location"
Linux/Unix/Cygwin:
Copy the path instead, (in the right-click menu),
cd to the directory using a console or cygwin,
use the 'find' utility. E.g. type find . -iname 'SomeFolderName*'
If there is already something in the folder, I suggest you do this:
Ctrl-Shift-F to search for files
Enter the directory name inside a wildcard pattern (eg. */META-INF/*)
open the first file that occurs in that folder
Click on the circular target icon to "scroll from source" (at the top of the project panel).
If you find yourself wanting to search for folders/packages often, you can use the Go to File command (Ctrl + Shift + N) and set a filter on Directories so that you can quickly search for directories and packages. The filter will be saved for the next time you use Go to File. As a demonstration:
Use Go to File (Ctrl + Shift + N) and click on the filter icon (funnel-shaped) on the top right of the search box. Disable/unselect all other selections and only keep Directories selected.
Try searching -- you should only see directories and packages in the result.
Try using Go to File again -- you should find that the filter still exists

How do I add an existing folder to Visual Studio 2010 Express project?

I'm trying to add a folder and some files within it to a Visual Studio 2010 Express VB.NET project. I have read the answers to questions on this subject here and here. They both say "select folder, right click, and then select Add To Project".
But when I right-click in this way, no "Add to Project" option appears. Does anyone know why this is so, and what I can do about it, or alternatively another way of adding a folder to a project?
Yes, this works fine. Click on the "Show All Files". You'll see ghost images of all the files that are not included in your Solution. Right-click on the folder that you want, then click the "Include in Project" It comes right in with no problem and shows up in your Solution Explorer menu.
I found this:
Visual Studio - Add Existing Folder
Instead what you can do is hit the "Show All Files" tool strip button at the top of the solution explorer, then right click on the folder you want to add and hit "Include In Project". Pretty trivial. Its amazing how long you can use a product and not know about all of its features.
Click on File.
There you can add a new or an existing project.
Once you've added a new or existing project, you can rightclick and add projects on the solution explorer.
So there is absolutely no need to show hidden fiels etc.
I understand your problem because I also use VB.Net 10 Express, and have also used the pukka versions. You do NOT, as you are aware, have the right click add to project facility however there is a way to add an existing form/class/folder etc to a project, but you have to be prepared to dive into the .vbproj file.
Here is an example of one I added to one of my projects. First of all EXIT VB.NET
Now copy the .sln, .suo, .vbproj, .vbproj.user files somewhere else or just zip them up as a backup in case you manage to screw it all up!
Next open the .vbproj file with an editor. You could use notepad or textpad but I use and recommend scite. Anyway whatever you use it must be a plain text editor. Forgive me for stating the obvious but do NOT used Word, WordPad etc.
In the file find the section that starts
<itemgroup>
You can tell if you have the right one by the fact that the entries say
<Compile Include=
Other groups say reference include or import include and you don't want those. Within that section add the code needed to get your folder and files into the project. Here is a sample:
<Compile Include="SuperPro Extras\FGeophysicalReport.designer.vb">
<DependentUpon>FGeophysicalReport.vb</DependentUpon>
</Compile>
<Compile Include="SuperPro Extras\FGeophysicalReport.vb">
<SubType>Form</SubType>
</Compile>
Note that your FOLDER is added at the front of the file names. For each of the vb files you should add the name of the designer file and the name of the code file (as above).
Finally you need to include the resx file. You will find another ItemGroup that comtaines the embedded resource files. The resx file is added into this group in exactly the same way.
<EmbeddedResource Include="SuperPro Extras\FGeophysicalReport.resx">
<DependentUpon>FGeophysicalReport.vb</DependentUpon>
</EmbeddedResource>
Note the folder\filename on the first line and then the dependency WITHOUT and folder name.
I know this is a LONG time after the question was asked so possibly not usefull to you but I hope it helps someone else. I think I will develop a utility to do this. I have one for assembly/file numbers so this would be a useful addition.
I wanted to add a little more comprehension to this as some of the directions were not explicitly clear considering one's level of Visual Studio knowledge. Here's a quickie on how I accomplished this task (using VS2013).
Drag/drop folder you want to include in the Resources folder
(i.e. %path%\"Project Name"\"Project Name"\Resources\)
For this example, I wanted to add a folder structure named AppData.
In Solution Explorer, on Top Panel, click Show All Files then click Refresh.
Locate your folder (mine: AppData) under Resources then right-click > Include In Project.
Images for guidance:

Uploading all opened files in dreamweaver?

Is there a way to upload all the opened documents to the current site without having to load em manually?
At the moment for each opened document I select one and I press Ctrl+shift+U but it's kinda lame if you edited more than 10-20 files
thanks
There is no native function however I have this simple cheat I use:
Open up the find and replace dialogue
Do a search for a string that appears in all the open documents. The page title usually has something useful. Make sure "all open documents" is selected. Click "Find All"
The panel appears that shows you all the instances of your search (should be all the open files)
Highlight all the file names in the search results panel, right click, and click "put"
It actually only takes a few seconds and saves you the pain of having to put each file individually. This is obviously for cases where simply highlighting the files and clicking the put button isn't feasible (e.g. files in multiple directories, etc).
In CS6 (not sure about older versions), when viewing the local site, right-click on the project's parent directory, hover on 'Select' and then 'Checked Out Files.'
This will highlight all the files you have checked out and allow you to check them in with one click.
Note: As Dreamweaver gathers all of the check in status information from the server, this can take quite a while if it is a large project. Only suggested for smaller projects, in which case it seems to work great!
Following the same process, you can also select 'Recently Modified', which only searches your local site and is much faster (but doesn't directly answer the check in/out part of your question).
I hope this helps!
I was a big fan of the Get Put All Extension, but it does not work on CS4 or CS5.
Unfortunately, upload all open is not built in. A long while ago I wrote a Dreamweaver extension called Get Put All, which allows for getting or putting of all open documents. It should still be available for sale (probably $5 or under) at the CommunityMX web site (down for me at the moment). I no longer contribute to CommunityMX, so I won't see any proceeds. While written a while ago, it should work fine in newer versions of Dreamweaver.
Just found out how to do it.
Use ctr+select all the files in the tree view under files and then right click on the selected entries and click "put"
SOLUTION:
1) Click on "Site"
2) "Manage Sites" (Select the site you want to manage)
3) "Edit"
4) "Remote Info"
5) And tick the checkbox "Automatically upload files to server on save"
(See where I am going here)
Have all the files you want to upload OPEN on Dreamweaver
6) Then "Find" a common code each document has
7) And "Replace ALL" with the EXACT same code
*Make sure "Find in: OPEN DOCUMENTS" is selected before you do the replacement
Once Dreamweaver has find and replaced the exact code - all documents will be unsaved at this point.
8) Just click "Save All" and voila!!! Now your CTRL+SHIFT+U fingers can chill the F out!
Hope this helps!
Oh, Remember to uncheck "Automatically upload files to server on save" afterwards or when not needed
PS: When you click "Save All" - you might get Dreamweaver saying "NOT RESPONDING". Just leave dreamweaver alone until it's done because it's uploading files at a rapid rate depending how fast your internet is :)

"There is no editor available for ../Form1.vb" error?

I was happily using VB.NET, saved, and, well, there was a blackout.
Probably lucky? Well, now I open my project just fine, double click the Form1.vb and.... "There is no editor available for ../Form1.vb, make sure the application for the file type (.vb) is installed."
.......... Did something go wrong with my project? Is it dead?
Windows 7, Visual Basic 2010 Express.
What should I do?
The same thing just occurred to me but I couldn't get it fixed trying the previous answers. For some reason, one of my references Microsoft.Office.Core had a yellow exclamation point on it.
Simple Solution
Solution Explorer
Expand References
Right click on the item with "Yellow Triangle w/ "!" point"
Select "Remove"
Open the "Build" Menu at the top
Select Rebuild "filename"
Once this was done, I could open my forms correctly.
It's difficult to imagine what you're seeing. I've seen plenty of cases where the design view won't open for whatever reason, but I've never been unable to view the code for the form.
First thing to try is navigating to your project folder in Windows Explorer, right-clicking on the Form1.vb file, and trying to open it in Notepad. This is pretty much the ultimate test. If you can open it in Notepad, your work is salvageable. If not, the file is corrupted and your best bet is to start over. I suppose if you really feel that you have a lot invested, you could try various file recovery techniques, but considering it's a single form file, I seriously doubt it's worth the time or expense.
If that succeeds, and you can open the file in Notepad, select all the code and copy it to the clipboard. Now go back into Visual Studio, and add a new Form to your project. Delete everything in the new form's code file and paste the salvaged code from your original form back in. You still won't be able to open the form in the designer though, and you'll likely be missing references to all of your controls. Ignore all those squiggly underlines for now.
To fix that, you need to go back to Windows Explorer, and find a file named Form1.Designer.vb. This is the partial class that the designer saves information into; it contains declarations for all of your controls and the properties you set for those controls at design time. Just as before, right-click on this file and open it in Notepad. Select everything and copy it to the clipboard. Now go back to Visual Studio, and click on the "Show All Files" button at the top of the Solution Explorer (hover over them to read the ToolTips). You'll see a bunch of extra junk show up, but what you're primarily interested in are the drop-down arrows that just appeared to the side of every Form class. Expand the new form you added in the previous step, and find it's .Designer file. Delete everything that's in there now, and paste in the code from your salvaged form's .Designer file.
You now have an exact copy of your old form in your project. You can delete that old, corrupted form file, because you're no longer using it. You'll also probably want to change the name of the new file itself by right-clicking on it in the Solution Explorer—right now, it's named Form1 just like your old form, because it's an exact copy of that form. The code says it's name is Form1 and couldn't care less about your file name. Clean and rebuild your project, and if things go your way, everything should be back to normal.
Windows 7/ Vista:
Try right clicking the .vb file and selecting the "Previous versions" tab. When the list has loaded (if it has) select the most recent file from the list and select "Restore". Now reload your project, try doing this with all of the form files, e.g. "Form1.resx" and "Form1.designer.vb" and "Form1.vb" and then reload the project.
It implies that the file is corrupted.Replace an uncorrupted copy of that file in the corresponding directory and then try.
I had the same problem and it was from a bad reference to Excel caused by copying the project from a Win7 machine to a Win8 machine probably.
Open the solution explorer and expand the references You will see two references with the yellow exclamation mark icon beside them indicating a problem - Microsoft.Office.Core - Microsoft.Office.Interop.Excel Right click on both these icons and click remove Your form should load now, if not, save the project, close it then reopen it.
i have this problem too . when i restart Visual Studio the form create successfully and show it's designer.
I've created the Form with a different version of VS, other than 2012 (eg VS 2010, VS 2013, VS 2015; I've used VS 2015). Save the Form in the solution, open the solution with VS 2012 and include the form in the solution. It worked for me.
To fix the problem you need :
1) NotePad++
And you should follow this simple steps :
1) Close Visual Studio .
2) Go to the Backup Folder of your VS version usually in : "C:\Users(your user name)\Documents\Visual Studio (year)\Backup Files\your project or application name" .
3) Open the last Backup file of your corrupted file , usually the name format is : "Recovered-month.-day-year-time.(Your File Name).cs" with NotePad++ , and copy the source code .
4) Go to your corrupted file in the project folder and open it with NotePad++ , Edit => Select All => Past the source code and Save .
5) Go to windows start list and search for : "Visual Studio Tools" folder , open it and double click on : "Developer Command Prompt for VS(year)" .
6) Write this two codes in the Developer Command Prompt : "devenv.exe /setup" and then "devenv /resetskippkgs" .
7) Open your project .
Note : if this didn't work for you try to do the steps before in this arrangement :
1) => 2) => 3) => 4) => 7) => 1) => 5) => 6) => 7)
and your problem will be fixed .
It works 100% for me , i hope this will helps you
Try changing the security permissions on the form affected. Right click the file, go to properties then security and change the access ability to everyone.