The changed files tab in VS Code Activity bar is missing.
Changed files tab
My current activity bar is as below.
Its showing the search and pending changes together. What should I do to get my changed files tab back?
VS Code version: 1.74.3
Operating System: Windows 10
If a panel is not in a spot you want and you want it back in its original place you can right click on the panel/view header and choose Reset Location.
Check this answer for more solutions.
Also, View: Reset View Locations command to solve this problem in Visual Studio Code version 1.47 (macOS - Catalina).
To do this, just press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Linux/Windows), type workbench.action.resetViewLocations, then press Enter.
Related
The "open file" dialog in Visual Studio Code is not showing hidden files. For example, when looking at my home directory, none of the . files are shown:
I did look through the settings.json file, but I did not find any applicable setting. So - how do I configure Visual Studio Code properly?
On Mac you can hit cmdshift. in the open file dialog, to see hidden files.
(Source)
go to file -> preferences -> settings
and in the search bar, search for "files.exclude"
then delete whatever json setting that you don't want to hide that specific file
Under Linux you can right click on files in the file selection window and check the "Show Hidden Files" checkbox.
Here's a screenshot from Ubuntu 20.04.1 LTS, VS Code v 1.52.1 after right clicking on the header.php file with "Show Hidden Files" option enabled:
To display hidden .git directories in Visual Studio Code, do the following:
On Windows or Linux, select File → Preferences → Settings.
On Mac, select Code → Preferences → Settings.
In Visual Studio Code settings (Settings Editor), select Editor → File and scroll to (or search for) Exclude. Comment out the glob to exclude .git files (// **/.git). See the attached screenshot: VS Code glob commenting.
Also see Visual Studio Code User and Workspace Settings. You will find the default settings on the page, which you could edit, but I chose to comment the glob out to conveniently hide these files later should I so desire.
Visual Studio Code: Show hidden folders contains more information on the subject.
On Windows, in VS Code, go to File > Preferences > Settings.
Search file.exclude and hover over the hidden files you want to see and click the "X"
Linux:
ctrl + ","
in search, type: "files exclude"
This shows all the patterns VS Code uses when deciding what to ignore. If you wanted to view a .git folder, you would simply remove that pattern from the list of patterns "**/.git". When you want to stop seeing it, just add that pattern back.
On Windows, open the .vscode folder in the explorer and comment out the file types you wish to see. There is no need to restart VS Code, just click the refresh explorer button.
If anyone wants a quick way to toggle the visibility of hidden files, you can use an extension:
Peek Hidden Files:
Toggle the visibility of excluded files by Explorer's context menu. I'm currently using this one.
Make Hidden:
Has a context menu option to hide selected items in Explorer.
Has an area to view hidden files.
Explorer Exclude:
Can control hidden file glob patterns without going to settings.json.
preview image
In menu View in Visual Studio Code, select SCM (shortcut Ctrl + Shift + G), right click on the Git icon, click here and select Keep.
I opened few files during coding (both files in project and out project). After that, I close few in its (by ctrl+w and click the 'x' button).
When type ctrl+tab, I always see all opened files.
I try to restart VSCode, restart Windows but nothing change.
How do I close unnecessary files?
I use VS Code 1.0 + Windows 10.
Edit: This feature added in new versions
If you want to clear a specific item (not the whole list) from the recently opened list you have to
Press Ctrl + SHIFT + P
Type Remove From History (in earlier version it is Remove From Editor History) and press Enter
Choose/Find the file you want to clear
Source: link
Update 09.04.2020:
With the release of Visual Studio Code 1.44.0 you can easily remove a file using the UI. You see a closing x next to a file in this recently opened files view:
I could be mistaken but you don't want to delete, but "clear" recently opened files. If that is the case, then follow these steps in regards to VS Code version 1.15.0:
Press Ctrl + Shift + P
Then, within the Quick Open bar, type in >Clear Recently Opened
Press Enter, restart Visual Studio Code, and you should now see nothing under Recent.
Cmd + Shift + P
Clear Editor History
I have just found a workaround which seems to remove a single directory from recents, in case you do not wish to remove all of them.
Press ctrl+shift+p (you may need command+shift+p instead if using a Mac) and select File: Open Recent...
After you click on that, you should see a dropdown with your recently opened projects. Hover with the mouse on the one you want to delete and towards the end of the line you're hovering you should see a small x appearing
Click on that x and you're all done
For latest Visual Studio Code (1.54.2):
View-Command Palette or Ctrl + Shift + P
in the Command Palette dialog box: File: Clear Recently Opened
Restart Visual Studio Code
Press Ctrl + SHIFT + O
You can see recently opened projects and files list
Click the cross icon (X) to remove
My bookmark window looks like this:
Yesterday though suddenly and out of nowhere there were one check box at the left of each bookmark. Until then I didn't know (or didn't care) that you can enable and disable bookmarks in Visual Studio (2012).
Today the checkboxes are gone. :-( I can still enable and disable them via the menu option Edit -> Bookmarks -> Enable Bookmark. I could assign this function to a shortcut key combo, I guess.
But how can I get the check boxes back?
Update: The same applies to VS2013.
Update: ... and to VS2015.
Update: Also to VS2017.
From my point of view this is a VS-Bug.
My CheckBoxes are also "away" or better seems to be away. When you click the position where the CheckBox actually is it still works.
Means: When I click left to the bookmark "flag" (where check box normally is) the bookmarks still can be enable/disabled.
This has been fixed in Visual Studio 2015 Update 3.
BTW: This is the original thread in connect.microsoft:
Bookmark Window: Checkbox for enabling/disabling bookmarks is invisible
Just installed update 1 of vs2013 and now I can't drag .js or .css files from the solution explorer into my html views anymore.
Before you could do this and vs automatically created a script tag or link tag to the file. I'm not sure if it has something to do with the update 1 but I really miss that now, is there a way to re-enable it?
I had this problem in VS 2015; resolved by (re-)enabling:
(Menubar) Tools -> Options -> Text Editor -> General -> "Drag and drop text editing"
This not only affects the ability to drag and drop highlighted text (which is why I had turned it off in the first place), but also the ability to produce an automatically formatted link by dragging and dropping a file onto the editor window. There may be a way to separate the two, but I have not come across it.
The same option is present, by the way, in the same location, in VS 2012. However, I did not test the behavior of the option in that version.
I had the same problem and this is how I fixed it...
Option 1:
Go to Tools > Options > Text Editor > File Extension
...and add the extension of the file you are editing. In the editor selection list choose HTML Editor if it is an html or quivalent code you are working on... or just select the kind of code you are writing. After that hit Ok, restart VS and it should work now...
Option 2:
Right click on the file and select open with HTML Editor, save as default, and that should work as well.
Cheers
Try running as administrator, if you are not already.
I had this same problem. I tried #VictorSuarez's solution of adding the edited file's extension to the list of files to opened by the HTML Editor, but it did not immediately solve the problem. I then opened Visual Studio as an admin and was able to drag and drop links as expected.
For vs2022 this should be fixed in: Visual Studio 2022 version 17.3 Preview 3. Accordingly with quote from "Fixed - Pending Release" developer community issue from Jul 13, 2022:
A fix for this issue is now available in preview release. Try out the
fix by installing the most recent preview from
https://visualstudio.microsoft.com/vs/preview/ .
I'm looking for a way to have the current TFS workspace displayed in Visual Studio.
It's visible when I open the Source Control Explorer (or Pending Changes), but I want it to be visible too when I'm editing code. So for example showing it in the toolbar, or in the window titlebar, or in the bottom status bar, doesn't matter as long as I can see it with a single glance.
Any tips?
You can use the "Rename Visual Studio Window Title" extension https://visualstudiogallery.msdn.microsoft.com/f3f23845-5b1e-4811-882f-60b7181fa6d6 and use the [workspaceName] attribute. Hope it helps.
There is a add on that shows this info, you can dock it somewhere :
http://visualstudiogallery.msdn.microsoft.com/384a4952-6b6f-4391-bc59-1b2bd38e1baf
There are a couple of options to do this without an additional plugin.
Use the Properties view
Select the solution, a project, or any file in Solution Explorer
Press F4 to go to the Properties view. The full path to your solution will be shown.
Note that right-clicking the solution or project and selecting Properties (Alt-Enter) will take you to the Properties Pages which doesn't have the information you want.
Use the Source Control Explorer
Opening Source Control Explorer will show you the last accessed workspace. Most of the time, this will be the workspace for the solution you are working on. However, if you have had two Visual Studio sessions open for different workspaces, I have seen the first VS session switch to the workspace of the other VS session.
Use the Pending Changes view
Pending Changes will show the workspace just under the header for the view.
You can get to Pending Changes through:
Team Explorer => Pending Changes
View => Other Windows => Pending Changes
Hover the mouse over an open file, the tooltip will show the full path to the file.