How to stop InteliJ IDEA to highlight the identifier under the caret - intellij-idea

While typing with IntelliJ IDEA the identifier under the caret is highlight with a very ugly turquoise background. And all occurrences of identifier in a different shade of turquoise.
This can be helpfully. But not with that obtrusively ugly colour. And not right while I type.
Is there any way to configure that pain to become useful? A different colour might be nice. Or 2 sec delay. Perfect would be both.
Or if this is not possible then I rather live without and would like to know how to switch it of completely.
Thanks for any hint.

Settings | Editor | Highlight usages of element at caret (but it's disabled by default).
There is also Identifier Highlighter third-party plug-in which does almost the same.

#Martin I believe you can change this. If you go to settings -> general -> colours and fonts and find "Identifier under caret" you can customize things there!

Related

How to find the name for indentation of object-attributes in .tsx-file in PhpStorm

I'm editting a .tsx-file and are reaching upon this bonkers file-formatting:
... If I enlarge the window a bit, then it makes more sense:
But I would still like to change it, so value and onClick aren't aligned all that way to the right. Ideally, it would try to align them with the opening bracket (as they do), unless the opening bracket is more than 35 characters, from the line start. Or something like that.
Now, I assume that it's the TypeScript-formatting that dictates the Code Style for a .tsx-file. But when I open the settings: Editor >> Code Style >> TypeScript then there are BAZILLIONS of settings.
Which leads me to three questions:
Does anyone know what I need to change, so object-attributes doesn't follow the opening-brackets width?
Could I find the name of what I'm looking for, in some smart way? I tried hovering over the massive space, hoping that the little yellow light-bulb could shine some light on, what I was after.
Are there any presets, to be found somewhere? So I don't need to engineer a new Code Style, if I dislike the default.
Make sure that the following option is disabled:
Settings (Preferences on macOS)
Editor | Code Style | TypeScript | Wrapping and Braces
Function call arguments: Align when multiline
NOTE: It is possible that the default value has been changed somewhere since the previous version as I have seen a few questions for the same option but different language (PHP and JavaScript).
HINT 1: Did you know that you can paste your own code in the preview area and start changing options to see how they will affect it? It helps locating the right option a lot.
HINT 2: There is a special popup that shows formatting rules applied to the code. It does not show all possible options but can give you a hint what to look for. To invoke it:
Use Help | Find Action... (or Action tab on Search Everywhere -- they use to be different popups but are using the same popup nowadays)
Type adjust to filer actions
Select and invoke "Adjust code style settings" action
It will give you a popup with applicable rules (it's a limited set: may not list all).
An example for PHP code:

Looking for IntelliJ Idea theme for someone red-green colorblind

I'm colorblind and, while many themes for IntelliJ editors are just fine, I was wondering if there was a theme developed with the comfort of someone who is colorblind in mind.
The best solution would be to make your own color theme (https://www.jetbrains.com/idea/help/configuring-colors-and-fonts.html) or pick one you like from the internet and edit it to best suit you.
And to answer best your question, there isn't, in my knowledge, a color theme for red-green colorblind BUT there are "soft" color themes, which simply use very little color.
EDIT: Forgot to say that there is also an option (in BETA) to adjust the IDE depending on your color deficiency (http://blog.jetbrains.com/idea/2015/09/intellij-idea-15-eap-help-us-test-the-adjustments-for-color-deficiency/), this may help.
There is also an option in settings to turn on color-blind mode in settings
Settings → Appearance & Behavior → Appearance → Adjust colors for red-green vision deficiency
You can find more details about changes it makes in this document.
UPDATE: As of 2018.3, IDEA has its own high contrast theme. It may be potentially useful in this case. You can access in in
Settings → Appearance & Behavior
The example of the theme is here:
I've had the same problem, no theme seemed to fit my color-blind eye. So I spend some hours creating my own theme. It might not fit you, and it might be ugly, but it works for me :-)
https://github.com/oizo/intellij-colorblind-scheme
Settings → Appearance & Behavior → Appearance → Theme → Windows 10 Light
... solved the basic problem for me of not being able to read the word 'end' (too faded out) for example in:
print('zoo', end='')
What specifically is that called? And/or what setting would control that word individually? I want to change just that alone as I've grown to like IntelliJ's other choices.
Allow me to take this opportunity to mention to you normies haha love ya that we red-green-not-so-fully-differentiated see color alright (it isn't "blindness"), if the Enchroma glasses give me the right idea I find it kind of overwhelming that your world is so awash in colors, like turning the saturation way up on a TV. For me it's just that pastels are extra dim-ish perhaps, in a manner of speaking, such an unexpected effect from red and green cones picking up some of each other's frequencies. Overlap.

Pycharm / Jetbrains product odd highlighting. Any idea what is being highlighted?

I'm having a weird problem in pycharm that I can't seem to work out.
Using the Darcula theme, I'm seeing some odd highlighting as seen in the below image
Any idea what it is? I'm thinking I must have accidentally turned on some obscure tool, but I can't spot any rhyme or reason.
For whatever reason / somehow you have injected custom language (HTML?) into DIV (?) tags (the green background).
Settings (Preferences on Mac) | Editor | Language Injections -- find and delete offending rule. It should have "Project" or "Global" in most right column (Scope) -- do not touch "Bundled" ones.
Alternatively -- Alt + Enter while having caret inside problematic place and choose "Uninject xxx" from popup menu. This will only disable that rule (which is still enough to make it work as before) .. but you better delete such wrong rule at some point later.

Ignore whitespace changes in IntelliJ changebars

I have a file from our repository where I ran auto-indent (because it was a mess), and now the whole file is marked by blue changebars (down the right hand side of the editor window), making it difficult to find my changes.
I am already ignoring whitespace changes in the diff window (as described here: Intellij and changes tab), is there a way to also do this in the editor window?
I couldn't find a way to completely ignore whitespaces, but IntelliJ (I'm using version 2016) lets you set an option to color whitespace-only changes differentely:
Editor -> General -> Different color for lines with whitespace-only modifications
which helps tremendously.
At the moment [idea 13.5] it seems that is not possible to ignore spaces in the standard editor. You can open a support ticket
We also faced this in the company due the different codestyles used, at the end we settle for:
setting a common codestyle that everyone editing the code should [actually must] follow
reformat the whole codebase to the given codestyle
recommit the formatted code [without any addition or deletion, just the reformat]
It took just a bit of time, but at the end now we are working far better. In this way from that moment onward, we would have all the time the code that would aesthetically the same trough next versions.
You can completely disable the highlight of whitespace modified lines in :
Settings -> Editor -> Color Scheme -> VSC -> Editor Gutter -> Whitespace-modified lines
And then uncheck the background color :
Essentially, you want Intellij to use the --ignore-all-space or --ignore-space-change upon a merge.
My developer team also deals with this challenge because we have different code formatting preferences. The result is every merge is painful for no reason. The team loves being able to have their code formatting, but this negates it.
As of now there is no solution. Intellij has the technology to ignore whitespace, so fixing this is really just adding a check box on the merge diff screen or even in the version control settings.
There is a feature requests IDEA-107714
Please up vote it!
https://youtrack.jetbrains.com/issue/IDEA-107714
Try this,
View --> Active Editor --> Show whitespaces
this is guaranteed to solve your problem

IntelliJ: How to auto-highlight variables like in Eclipse

My employer wants me to use IntelliJ for Java development. Previously, I've always used eclipse.
One of my favorite features in eclipse was being able to click on a variable, method parameter, class field, etc and see the usage of those variables highlighted throughout the class.
Is there a way to enable this feature in IntelliJ IDEA? I'm using Ultimate version 9.0.3.
File | Settings (Preferences on Mac) | Editor | General | Highlight usages of element at caret.
I think Intellij does not do this by default for a reason.
If you click in a symbol on your code, you can hit Ctrl+Shift+F7, then it will highlight (High visible, not just like the default underline) all occurences of the symbol. Good thing is, if you move out the cursor of that symbol, it will keep it highlighted wherever you go.
Tip: You can highlight how many different symbols you want at the same time.
Tip 2: F3 / Shift + F3 goes to the next / previous occurence respectively.
Go into Settings->IDE Settings->Editor->Color and Fonts->General
Make a copy of Dracula to something like MyOwnDracula (can't change the built in schema).
Find whatever you need to change, in this case it's "Identifier under caret" and change the colors for foreground and background to your liking.
Even though this is a question on how to highlight all variables, point one and two will answer that meanwhile point 3 will make you more productive and rename all variables simultaneously if you so choose to do so.
With your cursor on an occurence.
Do Ctrl+Shift+F7 to select all other occurrences.
Then Shift + F6 to rename all occurences simultaneously.