JetBrains IDEA: how to disable diff highlighting in editor? - intellij-idea

I checked my project into GIT support and after that there are marks in editor showing me places I changed in file relative to the last commit (I think). It really slows editor. How to turn this off? I can't find the specific option in settings.

There is no way to disable it except disabling the version control completely in Settings | Version Control.
If it slows down the editor (it shouldn't), please file a bug with a CPU snapshot.

Related

Disable rainbow variables in PhpStorm

I accidentally enabled rainbow variables in PhpStorm and it looks absolutely horrible. It sounds kinda silly but I just cant find the settings to disable them.
I have looked up the extension and followed the steps to uninstall but I haven't found anything related to rainbow variables https://plugins.jetbrains.com/plugin/17748-rainbow-variable
I also uninstalled Rainbow Brackets and everything else relating to styling code or variables from the plugins page
And yes I restarted the IDE after those changes with no success. I'm currently on the version 2022.2.3 of PhpStorm.
If you have disabled that Rainbow Variables plugin and still seeing the functionality then it might be PhpStorm's Semantic Highlighting in action.
Settings/Preferences | Editor | Color Scheme | Language Defaults | Semantic highlighting and make sure it is disabled there.
Please note that Rainbow Brackets plugin turns the above option ON automatically and prevents disabling it (on IDE restart). This should be fixed in latest plugin versions:
2022.3.3 Fix #2541: [Rainbow variables] Ask to enable rainbow variables before turn it on
2022.3.4 Fix #2551: [Rainbow variables] rainbow variable does not take effect after IDEA is restarted
For PhpStorm 2022.3, it is here we can disable rainbow variables (even for .json file, where each line has a diffent color).
I found the same problem in IntelliJ. However, there're checkboxes in the IntelliJ settings -> Rainbow Brackets(yes, it has an independent setting bar). If PS has the same form of settings, you may uncheck the 'rainbow variable' box. screen shot

PhpStorm AutoComplete code is not working

I'm using PhpStorm over 3 months and it's a good IDE. I do not know what I've clicked yesterday but since yesterday I have issue with code completion in CSS mainly.
On the screen I have VS Code and PhpStorm and also I've opened the same project.
In VS Code it works perfectly. In PhpStorm it doesn't. I tried some Google First Aid like clear cache, update the IDE, turn On/Off Safe mode etc. but nothing changed.
My Code Completion settings:
Based on your PhpStorm editor area screenshot (many thanks for that BTW: not many people do post it even if asked), all your CSS files are treated as a Plain Text. It's rather unlikely to be a glitch, more like accidental settings change.
Settings/Preferences | Plugins -- make sure that CSS plugin is enabled. If not -- enable and restart the IDE.
If still the same: Settings/Preferences | Editor | File Types -- locate "Cascading style sheet" entry and make sure that it has *.css pattern there.
If not there -- it's possible that you have somehow reassigned it to "Text" file type. If it's there -- just add *.css to Cascading style sheet patterns (it will remove it from Text when doing that).
If still nothing: you would need to provide more/new screenshots.

Intellij - disable vertical line/right margin

Just installed 2017.3 and it had returned...
Cannot find the setting to turn it off.
IntelliJ IDEA 2017.3 version adds the ability to configure multiple soft limits for the file. This lets you configure several visual guides that will help control the width of the code. So the Right margin option (the characters lengts limit after which the code will be wrapped in Editor) was renamed to Hard wrap at option.

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

How to open files in Intellij-IDEA with double click?

My first day using this IDE...
is there a way to configure the IDE to open files in the project by double click? It is rather painful having to drag files from the project overview into the editor window.
You can change the KeyMap.
Go to File->Settings and find the keymap section.
You will have to create a new KeyMap by clicking copy, and then look in the View section for "Jump to Source" and change/add the keymap you want.
However, as Bozhidar Batsov noted, double clicking may not always work so well. Whether it works may vary by OS and/or windowing system. I have no trouble with it in Mac OS X, but it doesn't seem to work well in openSUSE.
There are also other predefined keymaps that you can select from this settings screen. They're set up to resemble other IDEs, so you might find them helpful if you're transitioning from something else.
It is easy way to do in windows.
I found a great solution to this problem by Jelmer Kuperus over at Orange11.
Create an .Xresources file in your home directory. Add the following line:
*multiClickTime: 400
Jelmer explains that this setting changes the default double-click speed from 200ms to 400ms, effectively slowing it down. Save the file and then run:
xrdb ~/.Xresources
The effect is immediate, no need to logout or reboot. Double-click in Intellij works as expected. I did try changing the mouse double-click speed in System Settings first before trying this out to see if that made a difference but it did not.
I am using Ubuntu 11.04, Intellij 10.5.2, and Sun JDK 1.6.0_26. YMMV
Use F4 to open quickly the selected files. Btw double clicking on files should work as well(at least in theory). Swing's buggy handling of such events, however, causes the double click to not always work in IDEA, so I eventually stopped double clicking and switched to using F4. You can also use "Autoscroll to source" from the projects menu - this will open the source files as soon as you select them in the project browser.