Disable code folding in IntelliJ Idea? - intellij-idea

How can I disable (or hide) this part in IntelliJ idea ?

Go to File -> Settings -> Editor -> General -> Code Folding
Uncheck Show code folding outline.

For IntelliJ 15+ with default keyboard bindings
Press cmd+shift+A on a mac or ctrl+shift+A on windows, to search for an action, and type code folding. This pops up a menu with an option of 'Show code folding outline' and on the right of it is an off/on switch. You can change this with enter or just click on it.
The settings dialog is old-hat these days.

Not sure what OP is asking, if one wishes to just hide the folding outline, then the #Phiter answer is correct.
However if one wishes to disable the actual code folding just uncheck boxes below the label Collapse by default.

BEFORE:
AFTER:
To disable the folding icons and folding completely uncheck all checkboxes as depicted here:

Color
If you want to be able to fold code without seeing the ugly Tear Line then set...
Editor > Color Scheme > General > Editor > Tear line to same as
Editor > Color Scheme > General > Editor > Gutter background
Then
Editor > Color Scheme > General > Editor > Tear selection to a different color
This should make it invisible, but still accessible when needed.
Code folding settings
These can be found here.
File > Settings > Editor > General > Code Folding
These settings should be enough to get the look and functionality you want. I personally like it to be invisible but I like to fold some HTML every now and then, but never folded by default. Jetbrains, of course, have a setting for that which you can find with the paths above.

File > Settings > Keymap
Find Hot Keys (comment)
Add new combination Hot Key for comment
enter image description here

Related

IntelliJ align multiple lines of code vertically

I am wondering how to align (the keyboard shortcut) a line or a block of code with the previous line, so that they have the same indention or starting from the same column in IntelliJ and PyCharm.
cheers
I think that "Emacs Tab" could help you. You can use setting search to find it or you can go Preferences -> Appearance & Behaviour -> Keymap. It is editor action and in some Keymap settings it doesn't have assigned key shortcut. I personally prefer remap Tab key to this action.

How to disable auto show hints in JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm) on mouse over

How to disable auto show hints in IntelliJ IDEA on mouse over?
Edit:
This hint could be very big if you call existing method with incorrect parameters. It's very uncomfortable.
There are the same behaviour in PyCharm:
and WebStorm:
Those popups (or tooltips) has been my worst annoyance in the editor for a while. There is how I fixed it:
On the editor, at the bottom-right of the window, there is a head icon. Click it and uncheck the box "Import popup".
You can have a look at this guide (with images) to help you finding the checkbox:
http://www.jetbrains.com/idea/webhelp/disabling-inspections.html
I hope that can help you
TOTALLY: Open Settings (or Pereferences, if you are OS X user) dialog, choose Editor | Inspections. On the Mange tab (right pane of the dialog) select Copy. Then click the language node. Here you can find the setion that is probably responsible for your tooltips and disable it. Or disable the whole language node, if you like. This way you have all the IDE features working and no tooltips at all. You can return back to Project Default inspections profile when you need it.
PARTIALLY: Try to disable the respected intention action. Press Alt+Enter when you see the tooltip, select the action from the list and press the right arrow key. In the context menu, select "Disable".
From JetBrains Forum.
You probably need to uncheck the Inlay Hints.
For Windows 10 & PyCharm Community 2020.3.3 :
File > Settings > Editor > Inlay Hints
Uncheck Show hints for:

IDEA: How to suppress warnings for spelling typos?

One of my functions encrypts a string and one of my tests verifies that it took place. Naturally, strings like sldjf982389 are not recognized as a valid English word, so IntelliJ complains.
If there a way to suppress these warnings without adding junk to the dictionary?
You can use following #SuppressWarnings
For example idea is complaining about "contentid" that should be "contentId" according to him
#SuppressWarnings("SpellCheckingInspection")
public static final String ARG_CONTENT_ID = "contentid";
You can disable that in the Inspections menu. Click on the little green box at the top of source code, or navigate to File > Settings > Inspections, under the Project Settings divider. You can then untick the box shown below.
SUPPRESSION facility for ANY inpection is built in :
Pay attention to right arrows on the menus.
For Intellij IDEA 2020, the path to uncheck typos is File > Settings > Editor > Inspections > Proofreading > Typo
For what it's worth, on intelliJ v2019.2
Go to File > Settings > Editor > Color Scheme > General > Errors and Warnings > Typo and uncheck Effects check box. Fin!
Project-level versus Application-level dictionaries
JetBrains is apparently steering people away from the complexity of inline-code spell-checker suppressions in favor of having the word added to the appropriate dictionary.
At first, I was also seeking the inline-code suppression, however, I can see that the dictionary philosophy is easier in the bigger picture of completing work and not becoming bogged down with inline-code suppressions and the clutter thereof e.g. for words that may commonly be used elsewhere in the project or several projects.
The option to use dictionary per-project or app-wide is available.
Find controls for per-project & app-wide dictionaries at menu item Editor > Natural Languages > Spelling. See the Dictionaries section of Spellchecking page of the IntelliJ manual.
In case you want to turn off spellchecking forever (for all projects) — I just found quick and dirty hack.
Go to File / Settings, then Editor / Colors & Fonts / General. Find settings for typo errors and set color for underline to color of background.

How can I use tabs for indentation in IntelliJ IDEA?

How can I use tabs instead of multiple spaces for indentation in IntelliJ IDEA 11.0?
I have "Use tab character" checked under "Code Style" > "General" > "Default Indent Options". And also tried to have "Smart tabs" checked, but it doesn't help.
From the documentation:
If this check box is selected, tab characters are used:
On pressing the Tab key
For indentation
For code reformatting
Otherwise, spaces are used instead of tabs.
File > Settings > Editor > Code Style > Java > Tabs and Indents > Use tab character
Substitute weapon of choice for Java as required.
IntelliJ IDEA 15
Only for the current file
You have the following options:
Ctrl + Shift + A > write "tabs" > double click on "To Tabs"
If you want to convert tabs to spaces, you can write "spaces", then choose "To Spaces".
Edit > Convert Indents > To Tabs
To convert tabs to spaces, you can chose "To Spaces" from the same place.
For all files
The paths in the other answers were changed a little:
File > Settings... > Editor > Code Style > Java > Tabs and Indents > Use tab character
File > Other Settings > Default Settings... > Editor > Code Style > Java > Tabs and Indents > Use tab character
File > Settings... > Editor > Code Style > Detect and use existing file indents for editing
File > Other Settings > Default Settings... > Editor > Code Style > Detect and use existing file indents for editing
It seems that it doesn't matter if you check/uncheck the box from Settings... or from Other Settings > Default Settings..., because the change from one window will be available in the other window.
The changes above will be applied for the new files, but if you want to change spaces to tabs in an existing file, then you should format the file by pressing Ctrl + Alt + L.
I have started using IntelliJ IDEA Community Edition version 12.1.3 and I found the setting in the following place: -
File > Other Settings > Default Settings > {choose from Code Style dropdown}
For anyone not able to get this, another thing you need to uncheck the following as well
Preferences > Editor > Code Style
[] Enable EditorConfig support
EditorConfig may override the IDE code style settings
My IntelliJ version 15.0.4
Another useful option in IDEA to switch off or keep checked if you really need that:
Preferences -> Code Style -> Detect and use existing file indents for editing
if your team is going to switch to tab formatting with existing code written with spaces, uncheck that
Have you tried .editorconfig? You can create this file in the root of your project and configure indentation for different file types. Your code will be automatically formatted. Here's the example:
# top-most EditorConfig file
root = true
# matches all files
[*]
indent_style = tab
indent_size = 4
# only json
[*.json]
indent_style = space
indent_size = 2
My Intellij version is 13.4.1
Intellij IDEA->Perference->Code Style(Project Setting)
To expand on #Dmitiri Algazin 's answer: settings for individual languages are overridden by the general setting
Preferences -> Code Style -> Detect and use existing file indents for editing
So if you are wondering why your new settings are being ignored after changing your settings for a specific language, there is a chance this checkbox is ticked.
As a side note; changing any default settings automamagically creates a settings profile clone (i.e. Default(1)) which I assume is in place so that the default IDE settings are never overwritten.
It is a little confusing at first, really, whether editing Default settings or Project Settings is going to have any effect on your project, since you can select Default from the drop down menu and then edit from there.
If you don't want to keep seeing random clones of Default populating your settings profiles, edit the Project Settings directly.
For those who are having trouble indenting phpstorm here I have a tip and I hope they help ...
First you have to go to file-> settings-> keymap-> select-> windows.
If they are on the windows machine. If you are on mac and choose macos.

How do I turn off the unlimited whitespace in IntelliJ editor?

How do I remove the ability to move the cursor after the end of line in IntelliJ?
File menu -> Settings -> Editor -> General -> Virtual Space and uncheck 'Allow placement of caret after end of line' . You may also uncheck the other options in the Virtual Space panel.
If the other answers don't seem to be working, you might have Column Selection Mode enabled. On my Mac it's mapped to Cmd+Shift+8. It's located under the Edit menu. That menu item will show a little checkmark when the mode is enabled.
To get the expected behavior where indentations are respected when you click on a line :
In Preferences > Editor > Virtual Space
Check :
Allow placement of caret inside tabs.
Uncheck :
Allow placement of caret after end of line.
This was really annoying to me and makes very little sense as a default behavior to me.
Note that for Intellij IDEA 11 for mac, settings are placed under the IntelliJ IDEA menu and called preferences. (Maybe some sort of mac default ?)
What Matt_Bro said (first answer), but if you've already got the box unchecked in preferences, try re-checking it (I checked all the virtual space boxes) and restarting. Then uncheck and hit apply--at this point unlimited space was disabled for me.
IntelliJ IDEA 2016
By default, it's turned off (unchecked).
If it is turned on, you can use one of the following 2 approaches:
File > Settings... (or Ctrl+Alt+S) > Editor > General > Virtual Space section > uncheck Allow placement of caret after end of line
Help > Find Action... (or Ctrl+Shift+A) > type "Virtual Space: Allow end" > Enter or left click (to switch between On and Off) > Esc