Exclude files from Android Studio lint spell checker - android-studio

The Android Studio lint spell checker flags hex codes that look to it like words in certain files that would be better off unchecked, such as values/colors.xml and build/intermediates/dex-cache/cache.xml.
How do I tell lint to not spell check certain folders or files?

This can be done by using IDE scopes. In Android Studio (at least 3.4) you can configure each inspection per scope. The idea is that you create a scope that contains all files you don't want to be spellchecked, and then switch Spelling inspection off for this scope, but keep it on for everything else.
Add a new scope in Settings / Appearance & Behavior / Scopes that contains all files which you want to exclude from spell checking. For example, this pattern covers all svg files: file:*.svg. In your case it could be like file:*/colors.xml||file:*/cache.xml. IDE will highlight all affected files by green, so you can check if you entered correct pattern.
Then set up Spelling inspection, so that it is OFF for your new scope and ON everywhere else.

Had the same problem with colors.xml
I couldn't find a way to disable the check for a certain file, but I could get rid of the spellcheck on the hex codes.
Click Analyze->Inspect Code.
Choose Whole Project and click OK.
The inspection tool window will open with the results.
You should be able to see the problematic hex codes under Spelling->typo.
Right click any one of them and choose Exclude.
Did the trick for me. HTH

Related

VSCode Vim multiple cursors

I have looked everywhere and I am still unable to switch off this 'feature'!
I've been using vi and, later, vim, since the 80's and I have never had need of multiple cursors, nor can I see a use for them.
:<range>s/search/replace/ does everything I need so this new feature is infuriating beyond words, especially as I've no idea how to switch it off when it seemingly-randomly appears.
Would someone be wonderful enough as to tell me how to banish, remove, consign-to-history the multiple cursors feature in VSCode Vim 1.12.4, please?
I believe this issue is specific to the plugin. I experienced it with the HTML plugin recently, and I'm assuming you have the same problem with HTML files, but the same principle should apply to other plugins as well. You just have to find the setting.
In the VS Code settings, there is an option that reads:
HTML: Mirror Cursor On Matching Tag
You can uncheck the box there to disable the feature. Or you can go to the settings.json in your local repo (inside the .vscode directory), or the equivalent global file, and add/modify the following field like so:
"html.mirrorCursorOnMatchingTag": false
That should take care of it for you.

Search-Everywhere in Android Studio (IntelliJ) makes Search File redundant?

In Android Studio (and IntelliJ), shift-shift is used to Search File (and Everywhere, e.g. class name etc).
I just realize it also have shift-command-O that search for a file.
With shift-shift, it seems to me shift-command-O is redundant.
So I'm checking to see if I have miss something that is in shift-command-O but not in shift-shift?
Shift-Shift shows a popup with occurrences of the string you've entered in names of files, classes, symbols and actions. Shift-Command-O shows a popup with occurrences of the same string only in names of files. Same task, same UI (in recent IJ/AS versions) more narrow filter.
Well you're almost right but there is one main difference in those two commands.
Shift shift will search for a file.
While shift-command-o will go to the specified file.
I guess in a way they to de same, but if you use Shift-command-o you will be redirected to that file and saves you one click.
But feel free to use what you want, shortcuts are for convenience so you should use what is most comfortable.
Here is a link with all shortcuts in IntelliJ IDEA, could be usefull in the future :)
https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf

Is there a way to enable interactive search in properties window?

I just started to use Android Studio and wondering if there is a way to search interactively in property window.
I mean like Xcode does. (It's not a properties, though.)
Is there a plugin or configuration for the function like this?
Android Studio actually has a search tool for properties similar to the one in Xcode. But it's implemented in a very unusual and un-intuitive way. Which makes it hard to find.
In Android Studio version 1.5.1, you have to click either on the 'Properties' header or any property-name below the header, and then you need to start typing the property you want, even though there is no text-box or any other indication that your typing will produce any effect.
When you do this, then a text-box appears with the characters you've typed in. And Android Studio highlights all the properties that contain your character sequence. You can then look only at the highlighted properties to find the one you want.
There is no filter like in Xcode, but if you start typing property name the selection will jump to the first match and the rest of the matches will be highlighted.

Where do I put custom syntax highlighter definitions for Sublime Text?

I have created a custom syntax definition in the new .sublime-syntax format, but I can seem to get it to appear in my list of available syntaxes...
I have tried putting it in:
<Install Location>/Packages
<Install Location>/Packages/User
<Install Location/Data/Packages
<Install Location/Data/Packages/User
%APPDATA%/Packages
%APPDATA%/Packages/User
The documentation seems to be bit light on how this works, but I'm hoping that someone can enlighten me!
The proper location for user-defined syntaxes, plugins, build systems, etc. is Packages/User, where Packages is the folder opened by selecting Preferences -> Browse Packages...*. I'm not on Windows at the moment, but I believe this is %APPDATA%/Sublime Text 3/Packages/User. Once you place the file there, it will be available from the syntax menu under User.
Also, please recall that .sublime-syntax files are only supported in the dev builds currently, and you need to be a registered user to run them. They will not work with Build 3083.

How to get resharper to skip generated files

Resharper really complains about files such as reference.cs that is generated by things like WCF service reference. How do I get Resharper to skip such files entirely?
menu ReSharper -> Options
Code inspection -> Settings item
button Edit items to skip
I got this to work by entering Referen?e.cs into the ReSharper Generated file masks list. Apparently the presence of the ? wildcard tricked it into applying to all Reference.cs files (well, remember that it will get files named Referente.cs too, but I can live with that.

Resources