How do I search for checked-in files only in IntelliJ IDEA? - intellij-idea

I cannot find a way to limit searching to checked-in files only (a la git grep <searchterm>). I really don't need a gazillion results from node-modules and build folders.

node_modules and build folders are excluded from the search already. If you have this problem, please show an example.
You also can configure a custom scope which would include files you want to search and use when you use Find in Files action.
There is no pre-defined scope as all checked-in files. See answer to a similar question: https://stackoverflow.com/a/42955231/2000323

Related

TFS 2015 Artifacts always empty upon build

I have created build definition which runs successfully. Now I want to create a release definition on the successful build, for which it is asking for artifacts.
When I tried browsing "Drop" folder, I found it empty.
Below are the images from Copy Files step and Publish build artifacts step.
I also tried instructions from The item MY_ARTIFACT_NAME in container XXX could not be found
But no luck. Please help.
I believe that you should use $(build.sourcesdirectory) (or a path relative to) as the source folder if you want to copy files which are not checked in.
Also, from the documentation of the Copy Files step
The pattern is used to match only file paths, not folder paths. So you should specify patterns such as **\bin\** instead of of **\bin.
Try changing the contents pattern to **\bin\** and see if that helps.

Best way to classify/mark babel generated files in IntelliJ

I'm using IntelliJ with Gulp (with the babel and sourecemap plugins) to help me transpile my source ES6 to ES5. What is the best way to mark these generated files?
They are being sent into a seperate dist folder but I want them to behave in the following way:
I don't want them to show up in usage/code search
I want their changes to be detected by the integrated source control
I have tagged them as excluded but I read in IntelliJ's docs that this will prevent the folder from being watched for changes. Anyone have a good way of doing this?
Excluding the dist folder via Mark directory as/Excluded is the right way to go: files in excluded folders are not indexed/show up in usage/code search, but they can be version controlled, so both your requirements are fulfilled.

How to prevent Arduino IDE from moving sketch into new directory?

I have a few sketches I'd like to distribute together. All of them use a custom library which resides in the same folder. The current directory structure is totally flat. All .ino files are in a single folder, right next to the .cpp and .h files for the library. This makes it easy to distribute and update.
This would work perfectly, except that each time I open one of the sketches to upload, the Arduino IDE forces me to move it into a subfolder, then it can't find the custom library. Is there any way to disable this behavior, or can anyone suggest a workaround? Thanks!
I tried at first to do all flat and found it never ending battle. Rather than always working around that, I work with it. My example.
Where I have my local repo in some arbitrary location, then have symbolic links in the ./arduino/library/. directory pointing to them appropriate directories in the repo. In the example I have symbolic links for both SdFat and SFEMP3shield in the ./library/. directory. I use windows so rather than links (or the ln -s command) I use "hard junctions".
Note the libraries use a directory structure of ./ardunio/library/foo/example/bar/bar.ino. So I actually do all my projects in the ./example/bar/bar.ino sketch. Also its worth noting that I use an external editor (like notepad++).
This way my repo can have more or less of what I specify it to.

How do I exclude folder from 'find', but still browse in the Project view, in intellij?

Any way to do this? Cause it keeps indexing and searching through my log folders, and i want to exclude the folder from find, but be able to browse and look at the files.
Sorry, but it's not possible. Exclude works globally. There is a related feature request, feel free to star/vote.

Using Mercurial with a Visual Studio/VB.Net project

I want to start using Mercurial on a VB.Net project, but I'm not sure which files should I add. Do I include the Project.sln file, bin/ and obj/ folders?
I would recommend using the hgignore detailed in this SO post
there is one that has 100+ up votes that would be a good starting point
With every source control, you should only include source files (i.e. files that are not generated during the build process), and the complete set of files necessary to build a solution. This does include the .sln file (for ease of use of the project in Visual Studio) but not the bin and obj folders, nor (usually) the user-specific settings (.suo), nor auto-generated files that can be re-generated.
A good rule of thumb is to only include things that you cannot easily regenerate. So, source code obviously meets this role and so does resources like images, sounds, and other data you need. Objects and the actual binary you generate from the source code usually are easy to get again and generally do not need to go in.
As for the sln file, if you will be making edits to the sln file and that's how others are to build the project, then you probably want to include that as well. If you generating the sln file from some other process (e.g., a script generates the sln and then builds it from that), then it's probably a good idea to leave that out.
Here's an MSDN article called Introducing Source Control. It lists files you can and cannot add to source control.