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

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.

Related

How do I search for checked-in files only in 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

How can I stop indexing intellij idea?

Without "excluding" folders, how can I stop Indexing intellij idea on start? It's very very annoying that it starts indexing on startup without allowing you to, for example, debug a test case making you wait until indexing has finished.
You can stop synchronizing/indexing each time you switch to the IDEA and it's quite useful when dealing with big projects and outside build process which triggers indexing.
Just disable checkbox System Settings -> Synchronize files on frame or editor tab activation.
Make sure you run indexing manually to update hints when needed through Synchronize menu (Cmd-Alt-Y on Mac) or File -> Reload All from Disk to run it manually for IDEA 2020 running under Linux
Try:
File-> Invalidate Caches / Restart.
I think that this issue happens (at least for me it seems to be the reason) if you start commit and then close the IDE in the middle of the process.
Now, "excluding" folders is the only way to disable indexing when a change occurs in one of excluded folders (except for generated sources that mustn't be excluded).
Checked with Intellij 2016.2.5
I suggest you to tune your Intellij configuration, see this post : https://stackoverflow.com/a/22508853/779338
You Can easily resolve it.
Just Go to: File -> Setting -> Directories.
Stop all the files that are going to included and need to empty ADD Content Root.
Like This:
It may be because of libraries folder is added more than one sub folder in the project. example in my case i have node_modules folder in two locations in the project. one is under root directory(app-->node_modeules) another one is under(app-->test-->node_modules)
Simply Right click on each folder and then selected Mark Directory As --> Excluded
It resolved my problem. Hope it would be helpful.
After struggling with this issue for around a week and searching all the solution I came to below conclusion:
either upgrade your intellij which gives you feature to pause the indexing ( I can't upgrade my intellij due to license issues ) so the other option was to disable all the plugins and then try enabling as per the need one by one.
After enabling any of the plugin if you see it behaving the same uninstall the plugin and download some alternative of it.
If longer indexing is an issue you can enable the shared indexes.
Add this plugin in your intellij and follow the instructions from here.
In my case i had constantly indexing files in Angular application when i remove node_modules folder.
I've tried to invalidate caches multiple times what didn't help at all.
Only solution was to remove project with clear Git state and reclone project - than everything started to work just flawlessly.

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.

Intellij Idea problem with text file impossible to read

I have a problem using Intellij Idea.
I am absolutely unable to load text file as InputStream - it doesnt matter where do I put the file (main/java, main/resources...) it just can't find the file - in Eclipse everything works just fine.
I tried setings->compiler->resource patterns and added ?*.txt but that doesn't seem to work either.
Any help is appreciated.
If you load it as a File, make sure that Working Directory is properly set in IDEA Run/Debug Configuration, since it's the default directory where Java will look for a file when you try to access it like new File("file.txt"). Working directory should be set to the directory of your project containing .txt files.
If you load files as a classpath resource, then they should reside somewhere under Source root and will be copied to the classpath according to Settings | Compiler | Resource Patterns.
If you can't get it working, upload your project somewhere including IDEA project files so that we can point to your mistake.
Look at the image, notice that the txt files are in the project root, and not the source folders (in blue).
If you open the Project Structure dialog, and click on Modules and select your module - are the correct folders marked as Source Folders on the sources tab?
Link for how to get to Project Structure dialog
Also, if you print out the absolute path of that file you are trying to read, is that anywhere near where you expect it to be?
An easy way to figure out the same would be to try creating a file in the same fashion and see where it gets created in your project. You can put your input file at the same location and it should work just fine (if it doesn't, you should check your resource pattern which might be causing the file to be not copied over in the build output).
This method actually gives you the working directory of your intellij settings which is pointed out in the accepted answer. Just sharing as I had similar trouble and I figured out this way. :)

How to edit cgi files nagios in particular

i want to edit my nagios cgi files but the keep opening as bin files. Does anyone know how to edit them or has anyone edited it before (nagios).
The reason i want to edit it is i want one of the pages to show columns instead of three, i checked the css but its not there.
Regards
Nagios config files are compiled into bin files. If you want to edit them you need to download the source, edit that, and compile again. Suggesting to the developers that the number, order, and type of columns seen be read from a config file might prove useful for the future.