VS Code - Search in Source Control View - visual-studio-code

Is there a search feature that we can use to search the files in the Source Control View (in the Activity Bar)? Let's say we have tens of files changed and when we go to the Source Control view, how do I find and add a specific file to the Staged state by using the UI?

Just pick any of files and start to type filename you want to find. Then typed text appear in the right upper corner of SCM View and you can filter out searched files.
See how it looks:
Also this way works in the Explorer view.
Upd. Official description of feature: https://code.visualstudio.com/docs/getstarted/userinterface#_filtering-the-document-tree

Related

How to view inline diff of multiple files at once in VS Code?

In VS Code, for a given commit I would like to see inline diffs from all files in one view or page, so that I would not have to click to see diffs for each file separately.
I can't find any extension that would do this.
Basically I'm looking for a feature like there is in Bitbucket when you click on a given commit, and you see all the differences in one page. Something like in the picture below.
in the SCM bar you have a COMMITS view
context click a commit and Select for Compare
context click another commit and Compare with Selected
Now in SEARCH & COMPARE view you can click a changed file and see a diff

How to attach images to github issues without dragndrop?

Is there a way to attach images to github issues without drag'n'drop, copy-pasting images or jumping through various hoops - just by using a file picker?
I find drag'n'drop very inconvenient, and copy-paste does not work in Firefox (on top of being rather inconvenient as well).
Github help page only mentions drag'n'drop, or copy-paste for Chrome.
The question here on adding images lists additional methods like creating a custom repository or wiki.
All of that is enough of a pain in the ass for me to ask a question here, hoping for a hidden way to use normal file picker.
There is a file picker. Simply click on the Attach files by dragging & dropping, selecting them, or pasting from the clipboard field.
Yes there is, its very simple, but not intuitive.
Consider this example where you want to comment:
Just click the highligted section with the text "Attach files by dragging and dropping, selecting them, ...".
Then a file dialog will open up:

How to turn on/off the SOURCE CONTROL PROVIDERS view in vscode?

I have one folder that contains multiple sub folders, and each of them is one git repository. Sometimes I can see this SOURCE CONTROL PROVIDERS view showing up and it's super helpful, but sometimes it doesn't show up. I would like to know if there is a switch on the vscode UI to turn on or off this view. (Maybe it's a plug in that I accidentally installed?)
Thank you!
Version 1.31.1 has a config parameter to always show the source control providers:
Type Ctrl+, to access settings
Search for SCM
Check the "Scm: Always Show Providers" option
You are using 1.17 released today (at least for me). For info about that panel see source control providers. I don't see a toggle for that panel - I assume you always get it if you have multiple SC Providers and open up the source control icon CTRL-Shift-G.
but sometimes it doesn't show up
Starting with 1.47 (June 2020), it does not show up at all, as it used to.
There is a new "single-unified view":
(the old view might come back in 1.49, Sept. 2020, see at the end)
The Source Control view has been consolidated into a single view:
All repositories are rendered in a single view, so you can get a better overview of the entire workspace status.
Additionally, the Source Control view can now be moved to the panel and other views can be moved to the Source Control view container
This... has not been appreciated. See issue 102118:
In the old system, if I had 4-5 repos showing, the one or two with active changes would show up clearly at the bottom.
Now it's very muddled, and sort by status simply puts the repos with changes at the top.
Here is the old view. List of changed files only show up when a repo is clicked. They are clear and distinct, separated from all the list of repos and everything else at the bottom.
The new single source view. One has to hunt for the changes amidst a list of other repos. It is cluttered, hard to parse, and requires hunting to find what you want. The old view was much easier to follow and use.
issue 104151 proposes to bring back the old view
Example:
The Source Control Repositories view is now back.
(It used to be called Source Control Providers).
It lets you control visibility of multiple repos in the Source Control view.
The setting scm.repositories.visible is now back
(It used to be called scm.providers.visible).
I've sprinkled visibility actions both in the context menu of the Source Control view as well as the ... menu, to make it easier to control the visibility without using the Source Control Repositories view.

How to exclude files/folder from Markers view in eclipse?

Is there a way in eclipse to stop markers from showing in the Markers view for files in a certain folder? I.e. I imported a Javascript library that I didn't write myself but it is going to be part of my project and I don't want to have to look at all the "TODO" and "FIXME" markers in those files and would just want to see my markers only... Is there a way to exclude certain folders or files form being scanned by the markers process?
Apparently, I was able to resolve this by adding the folders I wanted to exclude to the exclusion list under Project->Properties->Validation. (Click settings beside each validation, Add Exclude Group button, Add Rule button, select folder option, browse for relative folder)
You can configure the content of the Markers view (the one displaying errors and warning in source code) and the content of the Tasks view (the one displaying "TODO" and "FIXME") by clicking on the "small down arrow" in the top right of the view (near the minimize and maximize buttons) and then clicking on Configure Contents ... entry.
Hope this can help,
Manu
By selecting Configure Contents like Manu said, there is also the option to list the tasks for a specific working set, using the Scope area at the right.
That worked for me, and I'm not annoyed anymore by all Zend Framework #todo.
Hope this helped, Stéphane
I'm doing a node app and wanted to exclude my node modules folder. I found the only way to do this is to create a working set that excludes that directory and set the Task -> configure contents to that working set.
How to exclude a folder that is producing warnings/errors in an Eclipse project?

How do I get a particular labeled version of a folder in Borland StarTeam?

I'm about to perform a bunch of folder moving operations in StarTeam (including some new nesting levels) and I would like to set a label so that I can roll back in case of issues. I figured out how to set a label on a folder and all its children, but I couldn't figure out how to get the version of that folder corresponding to that particular label. It seems like labels are tied to the files themselves and not the folders/folder structure.
I've switched to Subversion and FogBugz so I am rusty on StarTeam. I think you need a View Label.
From View menu, select Labels... to open the Labels dialog.
On the View tab, click New... button to open View Label dialog.
Type in label name as "Release 1.2.3.4", check Frozen, and hit OK.
To get back to the state,
From View menu, select Select Configuration... to open the Select a View Configuration dialog.
Select Labeled configuration, and pick "Release 1.2.3.4"
You can then create a new view from the view label to branch off you want to. See the Help file > Working with StarTeam > Managing Views. Here's a quote from Configuring a View:
By default, a view has a current
configuration – that is, it displays
the latest revisions of the items in
the project. However, you can roll
back a view to a past state based on a
label, promotion state, or a point in
time.