Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignore whitespace changes in IntelliJ changebars

Tags:

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?

like image 362
Sasha Avatar asked Nov 12 '13 17:11

Sasha


People also ask

How do I get rid of whitespace changes in IntelliJ?

Essentially, you want Intellij to use the --ignore-all-space or --ignore-space-change upon a merge.

How to ignore whitespace in c?

scanf("%*[ ]") : skip initial whitespace, if any (requested format: non empty sequence of spaces, without storing it in a variable), ignoring the result.

Does git ignore whitespace?

We use the git diff -w command to ignore all whitespace differences. It will ignore spaces at the beginning, middle, and end of lines.

How do I show whitespace characters in IntelliJ?

To enable this feature in IntelliJ, you must open the Settings dialog ( Ctrl+Alt+S ) and navigate to the Editor | General | Appearance tab. In this tab you need to enable the Show whitespace option. In addition, you can individually enable/disable which whitespaces to show: leading, trailing or inner.


1 Answers

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.

like image 151
pawels Avatar answered Sep 18 '22 01:09

pawels