Say I have a project/folder open in VS Code and I want to open the folder in Windows Explorer, is there keyboard shortcut or a VS Code Extension for that? Sometimes I also need to go to the project folder in command prompt.
In Visual Studio 2017, there's a menu option to open the folder and an extension for quickly getting to the project folder in command prompt -- see below:
How do I handle these in VS Code?
Right click on a file or folder from the left side explorer of VSCode, then select "Reveal in Explorer". Now you can see the folder in windows explorer.
Related
I'm trying to open a project in VS Code. But I also have the same project open in IntelliJ in my laptop. Is it not possible to open a project in two different IDEs at the same time?
I am able to open other projects in vs code, but if I already have a project open intellij, I cannot open that in vs code. Is this not allowed in VS code?
Should I change anything in the settings of VS code??
Try right-clicking on the header "Explorer" in the Explorer sidebar where your open folder(s) usually appear. Two options, "Open Editors" and "Folders" will appear. Click "Folders" to make it checked and your folders will appear.
I was wondering if there was a way to have Visual Studio Code open a file when accessed by Cygwin. For instance, when using an alias to change directories and open a Verilog file, have that file be opened within Visual Studio Code instead. I have very limited experience in Linux, and it looks like Visual Studio Code is easier to navigate/edit scripts, though that could be wrong.
One way to open a windows command (that is not in the path) from the cygwin terminal is to create an shell alias to start VSCode or Visual Studio with a filename from the cygwin terminal. Add a line to your .bashrc like:
alias vscode=<path to vscode>
Find <path to vscode> by right clicking on the link you use to open VSCode or Visual Studio using the desktop or start menu, and select "More -> Open file location". This will open an explorer window with a shortcut highlighted. Right click on it, and select "Properties". In properties click on the "Open file location" button. In the resulting explorer windows, use shift-right click on the highlighted file and select "Copy as path".
Back in cygwin, enter
cygpath -wa <paste>
(In the cygwin terminal, use "Right click -> Paste" or shift-ctrl-C to paste). Then use line editing to change the double quotes to single quotes and run the command. This shows you the string to use as <path to vscode> in the alias command. You must restart the cygwin terminal for the alias to be available.
To use this alias, enter e.g.
vscode <filename.ext>
to open the file is VS Code or Visual Studio. I use similar alias to open an explorer window, or my browser with an html file, or to open a file in Notepad++.
Can we add existing file or folder to VS code solution from explorer itself ?
One way is to add from file explorer but can this be done from VS code explorer itself like other Visual studio IDE solution explorer ?
We can't add it like Visual Studio IDE as how you will always have a link to it.
However, you can "Open" a file temporarily via Cntrl+O or can open a new Window with that other folder opened.
On Linux, the existing file can be inserted by copying to system's clipboard then paste from VSC.
To copy to system's clipboard:
xclip <filename>
Then paste to VSC as usual using Ctrl-V.
When i right click to open my project folder in VSCode, it is not opening, instead popup is shown as "Application not found". I tried reinstalling, but didn't work.
Try to open your project from File-> Open Folder menu in VS code. Than double click on your loaded project files.
I ran into this after a reinstall of VS Code. I had switched from the User Installer to the System Installer version.
Image of current download optons
The install didn't update the registry to change the Icon and "Open with Code" context menu to use the new path to Code.exe.
So you have a couple options. Reinstall your initial version (User vs System) or update your registry anywhere Code.exe is referenced.
User path: C:\Users[username]\AppData\Local\Programs\Microsoft VS Code\Code.exe
System path: C:\Program Files\Microsoft VS Code\Code.exe
Or perhaps even uninstall, clear out the references to Code.exe in your Registry, then install the version you'd like
I am coming from Sublime Text 2, where I can open a workspace (a directory with all the source files). There is an option "find in files" (ctrl+shift+f) that searches for an expression in all the files from that directory and subdirectories. Now, in Visual Studio Code, there is such an option with the same shortcut as Sublime, but it only searches in the files that are opened in a tab, not all actual files in the directory currently opened. Is there a way to do this with Visual Studio Code?
"CTRL+SHIFT+F" does only search on open files. What you need to do is open up the explorer "CTRL+SHIFT+E", right click on the folder you're attempting to search under, and select "Find in Folder...".
https://stackoverflow.com/a/43651677/6395820