Ignore whitespace changes in IntelliJ changebars - intellij-idea

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

Related

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 VIM mode, bookmarks across editors

I can use (ma) to bookmark the current position under (a). I can then jump back to us using ('a). However if I have two files open, I would have thought that when I have an upper case bookmark (mA), if I then in the other editor I jump to boomark (A) using ('A), that I would be taken to the editor that owns that bookmark, but it doesn't. In Eclipse it does this. Surely IDEA can be convinced to jump across editors using bookmarks?
It's a known issue that is likely to be fixed soon. Feel free to vote for VIM-523.

IntelliJ IDEA 13.1.2 javadoc and tabs

I hate to ask such simple questions, but nothing I found so far helped me...
So, I've recently started using IntelliJ instead of Eclipse and there are 2 things that really bothers me...
1.) size of javadoc popup window - ok, so I finally get this little guy to pop-up whenever I need it, but it's so small I have to use scroll every single time... and that's pretty anoying when I'm working with unknown libraries...
2.) tabs == spaces - maybe some of you like this, but I don't... Eclipse was treating tabs as tabs and not spaces... I tried to change settings but with no result... or is that maybe connected with project I'm working on? (meaning, if, at the start of a project, setting were such that tabs == spaces and now changes are not applied to it)
Sorry for stupid question but, as I said, nothing I found so far helped me...
1) Just resize the window with your mouse. It will retain the size the next time it opens. You can also click on the gear icon in the upper right corner and adjust the font size. Again, it will retain the size on subsequent use.
2) I'm assuming you make the change to the "Use Tab Character" option on the "Tabs and Indents" tab for all file types and saved the Code Style. After that, you need to run the Reformat Code action (Ctrl+Alt+L or Code > Reformat Code from the menu or Reformat Code from the context menu (i.e. right-click) in The Project Tool window or Navigation Bar). IDEA retains the previous formatting (so spaces in this case) until you run a reformat on the project (or a part of it).
If you have multiple projects already created, for each one, you will need to go into File > Settings > [Project Settings] > Code Style and set the Scheme (and then do a reformat). While the Scheme definition is saved IDE wide, the scheme to use is set per project (which makes sense since an Apache Open Source project you are working on may have different code style requirements than the projects you do at work vs the ones you do for fun).
Finally, you will also want to go into File > Other Settings > Default Settings > [Template Project Settings] > Code Style and make sure your saved code style scheme (with the use tab option) is set so that new projects use that scheme when they are created.

Disable apostrophe t space Intellij IDEA

When I type in a comment (JavaDoc or line comment) IntelliJ automatically inserts a tag when I type something like // don't and I hit the spacebar after the 't I see // don'< ></> with my cursor ready to type in the first tag. Does anyone know how to disable this behavior? I've tried google searching and searching through the settings with no avail. I'm using IntelliJ IDEA 13.0.1 community edition.
It sounds like a live template is being activated via the sequence tspace, although to the best of my knowledge this is not a default one. Go to File > Settings > [IDE Settings] > Live Templates. Search for a template that has t as its shortcut and inserts tags. Either delete it, or change its activation from space to tab (in the lower right). You may also want to check (and possibly change) the "default expand with" setting at the top.

Eclipse Indigo: shift+tab outdent (indentation) does not work anymore

After installing the new Eclipse Indigo, the outdent does not work anymore when I press shift+tab on a line. Is there any setting which activates this again?
Problem still actual for Eclipse Kepler
in Main Menu -> Window -> Preferences -> PHP -> Formatter -> {your formatter profile} -> Edit -> Identation -> General Settings:
change tab policy to Spaces and indentation size to 4 (or any desired amount).
Source: https://bugs.eclipse.org/bugs/show_bug.cgi?id=210108
Okay, so I am currently using Eclipse Luna Service Release 1a (4.4.1) and I was experiencing this problem too after switching from whitespace tabbing (4 spaces) instead of standard tab spacing.
The problem for me was that the area I was trying to de-tab/outdent/shift-tab (or whatever you want to call it) had a mix of 4xspaces and actual tabs in it.
Check if this is the case for you. If it is, you should do the conversion from one to the other. To do this, highlight everything in the effected area, then CTRL+F and replace all instances of however many spaces you are using, with "\t".
Make sure that the "Regular expressions" flag is checked.
SHIFT+TAB only seems to work correctly if only tabs or only spaces are used for indentation and won't do anything at all if there is a mix.
Also, naturally, ensure that the correct settings are applied for your tab policy in Main Menu -> Window -> Preferences -> PHP -> Formatter -> {your formatter profile} -> Edit -> Identation -> General Settings.
The functionality works fine and as intended for me since I did this. Make sure to restart the IDE as I have observed that it will subtly tend to stick to old tabbing habits in strange ways if you do not.
It may have something to do with the formatter settings (preferences->java->code style->formatter). I've experienced today the same problem on Eclipse Juno and managed to solve it by setting the indentation size to 4 and the tab size to 4 in the indentation tab. It might be worth to give it a go and play with these settings.
For those who none of the other answers worked, just try to install PDT (Php Development Tools). It has the right hot keys for performing this action. I solved this way.