Indentation in RubyMine 2017.1 - rubymine

Just updated RubyMine to 2017.1 and get new strange auto-indentation behavior:
the first line in method indents with 2 tabs
next lines indents with 1 tab
My settings was set to Defaults:
Ho to get the same indentation for the first definition and following?

guess, you should submit a bugreport to the youtrack with screencast and your codestyle file. I could not reproduce this behavior, everything works as expected.

Related

How to remove the red color indictors at the beginning of all the code?

When I updated Visual Studio Code, I am getting this annoying red indicator/highlighting before every line of code. Before the update, didn't have this issue. Does anyone know what is this and how to get rid of it?
I tried resetting and changing the theme but it didn't work.
I think this extension is causing your problem:
https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow
Try to disable/uninstall the "Indent-Rainbow" extension if it is installed.
For the "Trailing Spaces" extension, you can disable the highlighting option by adding this line to the settings.json file.
{
"trailing-spaces.highlightCurrentLine": false
}
You can find more settings here:
https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces
I had the same problem and I thought it must be some extension causing this and so I took a deeper look at all my extensions.
In my case there was an extension called 'trailing spaces' which was causing this.
the red highlighting disappeared as soon as I uninstalled it.
Try doing the same and if it doesn't work try to take a look at all of your extensions. (An easier way to do that would be to go over the extensions tab on the left navigation bar in settings menu).
On the bottom bar, to the right, just beside the "Ln XX and Col XX" you can choose "Select Indentation" to indent using spaces or tabs. Change that configuration or choose "detect indentation from content" and will solve the red background.
I just had to change the tab size from 4 to 2 (as configured within my eslint setup)
I kept the Indent Rainbow extension, but added this to my settings.json to disable the red highlights:
"indentRainbow.ignoreErrorLanguages": [
"markdown",
"python"
For my case it was an extension called Bracket Pair Colorizer

Code indentation messed up after pushing to github

The code indentation looks absolutely fine in my Xcode. But when I push it to github, it screws up the indentation
Does anybody know why? The weird thing is everything looks fine in Xcode. I tried to change Xcode Preferences, Ctrl + I, but none of them works. Any help would be appreciated. I'm using Xcode 10.1 and here are my Preferences Settings
Weirdly enough, in Xcode Preferences, switching Prefer indent using to Spaces and switch it back to Tabs seems to fix the issue
You can set indentation per file, group, project, see how to change your indentation settings here https://stackoverflow.com/a/47023275/1845432
It works for me
After changing your indentations settings, don't forget to reformat your files to apply the change.
⌘+a: to select all
Ctrl+i: to fix code indentation
I have it like this below and it works just fine with github.

VS Code turns everything into an html snippet?

a serious limitation for my workflow with vs code is the fact that while typing html everything gets turned into an html tag when pressing tab at the beginning of a line.
entering:
alsdjflkasjdfk + Tab
leads to:
<alsdjflkasjdfk> </alsdjflkasjdfk>
this is a problem since I want to integrate Django html snipptes and they end up not working. Does someone know how to turn this off? I rather just want defined HTML Snipptes than simply everything turning into one.
Try setting:
"emmet.triggerExpansionOnTab": false
This should disable this feature. We are also investigating a different flow for emmet with VSCode 1.12: https://github.com/Microsoft/vscode/issues/21943

Eclipse indentation issues

(Note: this is a self answered question and I just wanted to share my experience)
Working with Eclipse Juno 4.2.2 I set the general editor to indent code with 4 spaces. However, I wanted to indent html files with only 2 spaces and changed the HTML editor to use spaces and a length of 2 but nothing seemed to take effect because it was always indenting using 4 spaces. So, what was the problem?
To solve this, I just restored default settings in the default editor (using 1 tab) and everything just worked as expected: The Java editor and PyDev are set to indent with 4 spaces and html editor is set to indent with 2 spaces. This seems to be a bug in Eclipse.
Cheers.

Eclipse "Correct Indentation" ignoring spaces vs. tabs setting

I'm running Eclipse Juno Service Release 2 (20130225-0426) in Windows and I'm finding that auto-indent (Ctrl-I) ignores both the General/Editors/Text Editors/Insert spaces for tabs and Java/Code Style/Formatter/Indentation/Tab policy="Spaces only" settings. With both of those set, Ctrl-I indents the code with a combination of tabs and spaces, even though Ctrl-Shift-F uses spaces only. The problem is I don't want Eclipse to reformat my code -- just correct the indentation with spaces.
Is this a known bug or am I missing a setting somewhere? Thanks!
It appears the "Correct Indentation" (Ctrl+I) will attempt to copy whatever indentation was used on the line of code immediately preceding your selected block. (Even if that line is using a combination of tabs and spaces!) If I select the whole file then it actually uses my preferences.
Seems pretty deliberate to be a bug though in my opinion there should at least be an option for it. I looked through the Eclipse bug tracker for a while and didn't see anything.