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

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.

Related

Intellij Idea - how to get rid of thick caret/cursor

I pressed something in Intellij and my caret shape changed to this. How to revert to the normal thickness? Using Intellij 2016.1.
Compare to this, normal thickness should be that of a bold vertical line:
Update: On Android Studio 2.1 beta, same machine, same font settings, cursor is visibly thinner.
You can .. but it's not pixel perfect. I mean -- for me the value does not seem to control thickness in pixels but rather some index (which gets applied to some predefined values) -- at least this is my impression on what I see my computer.
In any case:
Help | Find Action...
Search for registry action
Once in Registry window -- look for editor.caret.width entry
Set the new value (for me the default was 2) -- make sure that field went bold (move to another entry) to ensure that new value was accepted.
Restart IDE (this option requires it)
UPDATE (2017/04/06):
You may also try ThinCaret plugin:
Makes your editor caret 1 pixel thin (for retina users)
You can change it under Settings -> Editor -> General -> Appearance -> Use Block caret
Other caret settings are under Settings -> Editor -> Colors & Fonts -> General. Then if you scroll down to the editor section on the right, there is a caret item in the list with font/color settings.
Please check the Picture for solution.
If you got here because of the thick cursor (block cursor) that behaves differently than the normal thin one. Just press the insert (Ins) button once and you are good to go.
Go to the Keymaps section of the Preferences and add your own Keyboard shortcut if you are using a Mac. Windows users can just enable/disable Insert mode on their keyboard.

How Do You Stop Android Studio From Deleting Trailing Spaces?

My Android Studio will continuously and automatically delete trailing white spaces. Particularly if it's a blank line with nothing but white spaces. I can even add the spaces back in manually and it'll get rid of them again right in front of me within minutes.
This is causing an issue for me because I am working on a large project that has been around for a while and our diff system shows changes all over the place as a result (our diff system doesn't have an option to turn it off and we can't switch systems). This makes code review more difficult and is causing headaches as a result.
How can I prevent Android Studio from doing this? I can't find it in the settings.
Thanks
You can disable it as follows:
Go to Settings (File -> Settings)
Find the Editor tab (under IDE Settings)
Select NONE from the dropdown list next to Strip trailing spaces on Save. You can also set it to Modified Lines since that would also fix the problem for your specific needs.
The reason it happens automatically is because it saves changes automatically when idle. You can change this behavious as follows:
Go to settings
Find the General tab (also under IDE Settings)
Check or uncheck the desired boxes under Synchronization
In Android Studio 2.0 you can find this setting in Preferences -> Editor -> General -> Other -> Strip trailing spaces on Save.

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 ignores the selected keyboard layout

This seems like a bug in IntelliJ 12: Every couple of times when I switch between keyboard layouts (English and Hebrew) IntelliJ get stuck on one of them and ignore the windows selected keyboard layout. This happens only for intelliJ, all other programs respond as usual to the windows selected keyboard layout.
Is there at least a workaround, or a way to reset IntelliJ's keyboard layout? The only thing that seems to work for me so far is restarting my machine...
(My OS is Windows 7 Enterprise 64bit)
This is 100% reproduced when you switch keyboard layout in quick class search (Ctrl+N). Also in intellij idea 13.
Something like:
Open quick search menu when keyboard is not in English layout (Russian e.g.)
Type anything
Switch to English
Congratulations! you stuck in russian layout :) restart your intellij idea!
When I ceased to switch layout in search, I forgot about this problem.
UPD: it's suitable for most part of text inputs (even for search and file creation)
I've just had this problem on PyCharm 2020.2.3
Here's how I've solved it:
Go to Settings -> Keymap
At the bottom of the window, check the option Use national layouts for shortcuts (require restart)
That did the trick
restarting IntelliJ also works.
I wonder how they managed to get such a stupid bug, this is not an easy bug to write, especially in Java.
That was found to be more like a global Microsoft/Oracle bug. Simple workaround from IntelliJ's issue tracker: use Windows' language parameters to assign a hotkey (Ctrl + number) for changing the layout directly to a desired language. This suddenly will affect both Windows And IDEA. It's said that bug was fixed in Win8. A bit more info: here
In 2020 bug is still relevant in the most IDEs based on IntelliJ. For example I observe this in PyCharm now.
There is workaround for Windows:
Go to Language Bar - Settings... - Advanced Key Settings
Set key sequence of To English action to Ctrl + 1
Set key sequence of to other your language to Ctrl + 2
Apply
Go to IntelliJ/PyCharm and switch language by new sequences
After that bug disappears and you can switch language by traditional method
For me the following actions seem to resolve the issue:
Go to Control Panel
Select Clock, Language & Region
Press Region
In the opened window choose English for Format.
Also all my settings except the location are set to English (locale, default keyboard etc.)
This fix worked on my mac, access Preferences -> Editor -> Typing Corrector from the intellij IDEA menu. If you are able to navigate to the same window on your OS, you can try this.
Uncheck Enable keyboard layout correction in the Typing Corrector window
I got the same issue in Ubuntu 16.04. Restarting IDEA doesn't change anything. But Changing the default layout to be the one I want by default ensured ubuntu work well with it.
Go to the search textfield above file editor.
Switch layout.
Type smth.
Click somwhere in the file editor.
Write smth with swithed layout.

IntelliJ IDEA hint parameters of method

I'm just swapping from eclipse to IntelliJ, and I can't find this particular feature.
In Eclipse, when the cursor is inside the brackets of a method-call and I press Ctrl+Space, it tells me which parameters this method takes. Is there something similiar in IDEA?
Use Ctrl+P (Cmd+P for Mac), it should show something similar.
You may also find the reference card (PDF) handy.
Except CTRL+P (or CMD+P for Mac)
There is new feature in IntelliJ IDEA EAP:
Parameter name hints
Settings > Editor > General > Appearance
preview:
Video from JetBrains about this feature: https://youtu.be/ZfYOddEmaRw
Related question - IntelliJ shows method parameter hints on usage - How to disable it
I'm using:
IntelliJ IDEA 2016.3 EAP
Build #IU-163.5219.11, built on September 27, 2016
Yes - just press CTRL-P.
Display the parameter-helper automatically, by adjusting the "Autopopup"-timer in IntelliJ / PhpStorm settings.
Navigate to:
File -> Settings -> Editor -> General -> Code Completion -> Autopopup in (ms)
Set it to whatever you like. Etc. 5 ms.
Ctrl+P if the keybinding is set to "default".