How can I increase the number of spaces of a single tab indent?
I noticed that in another project a tab corresponds to four white spaces, but in the current one it is only two.
It is a simple question, but I have not found an answer and it would save me a lot of time.
It's configurable in the code style settings: Settings (Preferences on macOS) | Editor | Code Style | Java | Tabs and Indents | Tab size.
Some projects may override it via EditorConfig. If you don't want it, disable Settings (Preferences on macOS) | Editor | Code Style | Enable EditorConfig support.
Related
IDEA: 2021.1.3
Svelte plugin: 0.19.0
I have the Svelte IDEA plugin installed and it keeps trying to indent everything with 2 spaces, instead of 4 spaces (the rest of the project uses 4 spaces).
I can't figure out how to customise it.
There's no "Svelte" entry under File | Settings | Editor | Code Style
All other code styles are set to 4 spaces (typescript, html, javascript, etc.)
There's no .editorconfig file in my project source
I could swear this thing was indenting consistent with the rest of the project just a few weeks ago, but now I'm not sure.
How do I tell IDEA to use 4 spaces for indenting Svelte files?
Svelte inherits indentation from HTML and JavaScript. Pay attention to the following settings:
Preferences / Settings | Editor | Code Style | JavaScript | Tabs and Indents | Indent.
Preferences / Settings | Editor | Code Style | HTML | Tabs and Indents | Indent.
If the settings are set to 4, check your .editorconfig file (if it exists) and finds indent_size = 2 entries. You can try to temporarily remove the .editorconfig file to make sure that the issue isn't related to it.
For me, the answer the was to turn off "detect and use existing file indents".
The indenting widget in the bottom right of the editor will tell you if IDEA has decided your file is "2 spaces" or "4 spaces". You can also use this widget to force re-indent to 4 spaces.
This auto-detection probably explains why IDEA suddenly started to behave differently. Maybe there was a change int he recent IDEA patch, or perhaps my project files changed through editing to trigger the algorithm into thinking the Svelte files were using 2 spaces for indenting.
How can I change colors in resulted diagram generated by Intellij IDEA UML plugin?
On image below you can see that actual colors are not readable. Diagram was generated from database.
I am not asking about how to change whole color scheme. I am satisfied with my color scheme. This is the only thing which I need to change.
UPDATE: #Andrey suggested how to change color of text from dark green to something else (Settings (Preferences on macOS) | Editor | Color Scheme | General | Text | Default text). But I noticed that this dramatically changes other parts of my code editor. I am using light mode in IDE and I think that more useful will be to change background color from almost black to something lighter. So the question was specified more closely to "How to change background color in diagram generated by Intellij IDEA UML plugin?"
I have found it. If you are interested, this is where you can change background color in diagram generated by Intellij IDEA UML plugin:
Settings | Editor | Color Scheme | Diagrams | Node background
Settings | Editor | Color Scheme | Diagrams | Node header
Please see the below images.
The first image shows the issue at hand; When writing a markdown file with the markdown plugin in intellij, the line wrapping adds a space at the beginning of the next line, and it accumulates for each new line. The bottom three images shows what I believe are the relevant settings.
Any idea why these extra spaces are being added? Is it a bug or a problem with my settings? It is really annoying having to always go back and delete the extra spaces.
This is the bug:
https://youtrack.jetbrains.com/issue/IDEA-220392
You can disable hard wrap for Markdown (Preferences | Editor | Code Style | Markdown > Wrap on typing) and use only soft wrap (Preferences | Editor | General > Soft Wraps)
When editing markdown files in intellij, I am not seeing the visual guide for columns at 80 and 120.
In Preferences | Editor | Code Style, I have Visual Guides: 80,120.
Is there another setting that I need to enable?
I'm using Intellij Ultimate 2018.1.5.
I saw a thread elsewhere where someone was having a similar problem, and it turned out their color scheme meant they couldn't see the visual guide:
Please check whether Setting | Editor | Colors & Fonts | General | Right margin is a color that's visible against your editor background.
source
How can I disable these colorful separators in PhpStorm ?
Settings/Preferences
Editor | General | Appearance
Disable Enable HTML/XML tag tree highlighting option