IntelliJ - Hotkey for add all final modifiers where possible? - eclipse

I've spent half my life in Eclipse, now transitioning to IntelliJ. Old habigs die hard :-)7
I really liked the functionality of Ctrl+A, Ctrl+1, add finals where possible to an extent it is in my muscle memory. Pls let's try to avoid the debate of usefulness/necessity. Pretty pls :-)
Is there a way to do the same in IntelliJ?

enable inspection "Preferences | Editor | Inspections | Java | Code style issues | Local variable or parameter can be 'final'", and run "Code | Code Cleanup"
you can use "Code | Reformat code" with "Code cleanup" checked in the dialog
also, you can make generated local variables and parameters final by default in "Preferences | Editor | Code Style | Java | Code Generation"

Related

Android Studio/Intellij hard Wrap (Flutter?)

I dont understand how do I change this new line "line" and change the point where the IDE starts a new line when I press STRG+ALT+ENTER. I also tried "Code style -> General -> Hardwrap" but it dosent change anything!
I saw it depends on the Programming langurage I use.... Now I have really no idea how to change this
It can be configured in Settings | Editor | Code Style | Dart > Line length.

How to disable IntelliJ's indentation-based brace handling?

IntellIJ 2020.2 added Indentation-based brace handling for Scala mentioned on the website here whatsnew. How do I disable this feature? I've searched for keywords "indent brace" and "brace handling" and cant see a setting that would disable it under "Code Style -> Scala".
As per IntelliJ Scala Plugin 2020.2: Indentation-based Brace Handling search for
Editor | General | Smart Keys | Scala | Control curly braces based on line indentation

Aligning Multiline Edit Cursors With Visual Studio Code

With Visual Studio Code's multiline edit functionality, is there a way to easily align all cursors in a column at the end of a line if the whitespace doesn't already exist (similar to what is possible with Notepad++)?
From this:
To this:
There is this extension by Mike Moore
https://marketplace.visualstudio.com/items?itemName=yo1dog.cursor-align
First I install the above extension.
Test Test <- Space here
even longer test text
testing
Selected multiple cursor as shown by |
Test Test |
even longer test text|
testing|
Then in command pallet (ctrl+p) and (shift+>) I type Align Cusor. Else I use Alt+A. Giving you this desired result
Test Test |
even longer test text |
testing |

VS Code adds spaces between content when pasting

When I copy this, for example:
<AdmobComponent/>
It pastes as:
< AdmobComponent / >
Does anyone have any suggestions? I don't even know where to start to fix this.
From within the IDE:
Go to File | Preferences | Settings and then click Text Editor | Formatting.
The top option should be FormatOnPaste, make sure this is unchecked.
If you are using the Prettier extension, then this is a known issue.
For anyone having a similar problem in Visual Studio 2019 it can be fixed as follows:
Go to Tools | Options | Text Editor | {language}
Now depending on the Language the options that need to be changed could be in a few different places or missing. But for C# and JavaScript go to Code Style | Formatting
Once there there are a few options. If "Automatically format on paste" is unticked it will completely remove any reformatting on paste.
Or for a more limited impact go into the "Spacing" section and change "Set spacing for operators" to "Ignore spaces around binary operators". By doing this some automatic reformatting is lost but I think it's worth it not to have all those spaces inserted into stuff like Kebab case variables.

Is it possible to draw vertical indent lines like in IntelliJ IDEA?

Is it possible to draw vertical lines in the editor that descend from the start of an indented statement, like in IntelliJ IDEA?
public...
| while...
| |
| | for...
| | |
Or if not natively, is there a plugin for this?
You cannot use vertical bars as indent marker character AFAIK, however, in Preferences > General > Editor > Text Editors, you can enable whitespaces markers, and tabs can be rendered as ยป , well aligned and so on, providing I believe a similar feeling than the | of intellij