How to adjust where the end of line is in IntelliJ - intellij-idea

In IntelliJ (just like in Eclipse) there is a thin grey vertical line in the code editor. I assume that just like in Eclipse, the line is showing where the "end of line" is supposed to be.
2 questions:
1) Where do you adjust how long a line is allowed to be in IntelliJ?
2) If not using the exact same property from #1, where do you adjust where the line is shown in the editor?
Thanks!

Go to Settings → Editor → Code Style → Right Margin (columns).

In IntelliJ 2019 and newer versions, go to Settings → Editor → Code Style. Under the tab General, there are 2 useful settings regarding end-of-line:
Hard wrap at, where you can define the text line maximum length.
Visual guide, where you can add additional guides (add one or more grey vertical line).

For IntelliJ 14 users:
In IDE Settings, Editor → General → Appearance, uncheck show right margin.

While being able to configure the setting I didn't get expected result from it. Later figured out that I didn't use monospaced font in the editor which made the margin setting behave odd. Hope that helps to those looking to solve this particular problem.

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.

Eclipse SQL Editor normal text color

I was able to change all the other SQL syntax coloring in Eclipse Preferences, but the normal (non-Sql-syntactic) text is still black and I couldn't find where to find the setting for that. Black text is kind of hard to read against an almost black background. Thank you!
If you are looking for the place to change the Text Editor color settings, go to Preferences->General->Editors->Text Editors, select "Foreground color" in "Appearance color options", uncheck "System Default", click on the color and choose the color you want.
If you want to change the SQL Editor color settings, go to Preferences->Data Management->SQL Development->SQL Editor->Syntax Coloring.
Edit: You need to change the "Others" item in SQL Editor's syntax coloring. It's working on my Mac, anyway. First uncheck "Default foreground color" and then choose the color you want.
Edit: For those not seeing the change, after selecting "Apply and Close", you must Restart your workspace to see the changes.
File -> Restart
Alexis Dufrenoy is absolutely right:
If you want to change the SQL Editor color settings, go to Preferences->Sata Management->SQL Development->SQL Editor->Syntax Coloring.
Edit: You need to change the "Others" item in SQL Editor's syntax coloring. It's working on my Mac, anyway. First uncheck "Default foreground color" and then choose the color you want.
Just in Luna release I have to restart Eclipse every time after changing SQL syntax coloring (other editors work without restart).
Its strange, but with Windows 7 its the only way.
I was having trouble with the existing answers on Version: 2019-03 (4.11.0)
Change the color of the "Others" option here to change the black text
You may also find it useful to similarly change the other options like "Single Quoted String" (blue default) , "Type" (purple default)
Since 2019-03-14 there is standalone and very simple SQL editor plugin available at eclipse marketplace: https://marketplace.eclipse.org/content/sql-editor - it's just for editing SQL files, syntax highlighting and contains an experimental SQL formatter. It has full customizable colour preferences and also good looking defaults for dark theme - see https://github.com/de-jcup/eclipse-sql-editor/wiki
It is open source, works out of the box, is small and has no dependencies.
So it could be a good alternative.
PS: I am the author of the mentioned plugin.

Idea: how can I hide the VCS changes markers in the right margin

I'm trying to hide the marker stripes in the right margin of intellij idea.
I tried whith:
settings -> Editor -> Colors and Fonts -> General
but it is not possible to check/uncheck "Error stripe Mark" in "Added lines" or "Modified lines".
I also tried to put white colors in "stripe mark color" in
settings -> Editor -> Colors and Fonts -> Diff
but the stripe is still present.
Do you know if it's possible to manage that without removing VCS support for the project?
There is now a setting as of IntelliJ IDEA 15 142.3728 (released as EAP in August 2015).
In preferences, go to Editor -> General and untick Highlight modified lines in gutter.
PhpStorm 2022
Uncheck the tick here.
I use version 12.1.4
Easiest way I've found is by right-clicking on the marker at the top of the margin.
Click "Customize Highlighting level" and bring the slider down "syntax".
This may also help:
https://www.jetbrains.com/idea/webhelp/editor-appearance.html
IntelliJ 14.
In dark theme, the change marker at right margin is very eye-distracting. The real problem is we can not close it.
Go to Editor -> Colors and Fonts -> General and
find:
deleted line in gutter
added line in gutter
modified line in gutter
Change to color you like.
Here is the official doc about changes marker.
I have found a solution. Set Editor > General > Error highlighting > Error stripe mark min height (pixels) to 0.

How to get rid of a vertical line in the editor pane of IntelliJ Idea?

recently a gray vertical line appeared in about the middle of the editor pane of my IntelliJIdea Community Edition 13.1.4 probably due to some manipulations with the settings that I cannot remember. I cannot find how to get rid of it, which is annoying. Who can help?
Thanks.
Updated answer:
Go to Preferences → Editor → General → Appearance and uncheck Show hard wrap and visual guides.
Original answer:
Go to Settings → Editor → General → Appearance and uncheck Show Right Margin.
You can also configure where the right margin is in the code style settings.
It is called 'Show hard wrap guide' now,
located in Editor > General > Appearance
In new versions of JetBrains IDEs, Hence, After 2017, you should search show hard wrap guide. see below screenshot:
It's inside of Editor > General > Appearance
In mac Command+Shift+A .. Search for "show right margin" . Press enter to turn it off. Booom
Go to settings and type line separator in search and hard wrap it to 180
For PyCharm 2017 and aboce it was moved, but can still be done by:
Editor > Color Scheme > General. Then in the new control to the right, open Editor > Guides > Hard wrap guide, and uncheck the checkbox for "Foreground".
2018-10-31
Settings -> Editor -> Code Style
you can find 'Hard wrap at [value] columns'.
230 columns is good to me.
Windows JetBrains Rider 2022:
File->Settings->Editor->General->Appearance
Uncheck "Show hard wrap and visual guides (configured in Code Style options)"
On windows, for IntelliJ IDEA 2021.3 (Community Edition):
File
-> Settings
-> Editor
-> General
-> Appearance
-> Uncheck "Show indent guides"
In version IntelliJ IDEA 2022.3 (Community Edition)
Build #IC-223.7571.182, built on November 29, 2022
You can browse to:
File -> Settings -> Editor -> General -> Appearance
Uncheck "Show hard wrap and visual guides (configured in Code Style options)
Or optionally if you really don't want to browse this long, just search on top left search option as "Hard wrap" or "visual guides".

IntelliJ: Move to next typo

IntelliJ IDEA has an inspection that checks for spelling. In the analysis overview, I can see how many spelling mistakes were found, e.g. 12 typos found. In the code they are highlighted using a wavy green line.
However, I find it very hard to look manually for those wavy lines. Is there a keyboard shortcut or a search function which will automatically skip to the next highlighted typo?
F2 and Shift + F2 shortcuts will navigate you to the Next / Previous highlighted error. You need to configure the error navigation first to Go to next problem instead of default Go to high priority problems option(from the context menu of editor right side bar):
See help for details. Another option is to use double click (F4 shortcut) from the Inspection Results window to go to the source.
IntelliJ IDEA 2016.3
If you want to fix all typos from the project, you can list all of them and iterate through them using double click (or F4 to open the source):
Analyze > Run Inspection by Name...
Type "Typo"
You will be able to see a list containing all typos grouped by file:
In Settings -> Editor -> Colors & Fonts -> General, you can add an 'Error stripe mark' color to Typo.
With the default settings of IntelliJ I find it difficult to spot the typos. So I do the following hack to spot and correct them once in a while.
Temporarily change inspection setting to show Typos as Errors.
IntelliJ then highlights the typos as Errors, making it much easier to spot them in the editor. I correct them and then revert the inspection setting changes. The changes can be kept permanently but I don't prefer that!