Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect auto indent YAML files #43424

Closed
Tracked by #1
egamma opened this issue Feb 11, 2018 · 3 comments
Closed
Tracked by #1

Incorrect auto indent YAML files #43424

egamma opened this issue Feb 11, 2018 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded

Comments

@egamma
Copy link
Member

egamma commented Feb 11, 2018

From https://twitter.com/trondhindenes/status/961944911846215680

image

https://video.twimg.com/tweet_video/DVmV_wjW0AAuryy.mp4

Caused by this PR #41378

@aeschli can you please review whether this is a candidate for the recovery build and adjust the label/milestone as needed.

@egamma egamma added the candidate Issue identified as probable candidate for fixing in the next release label Feb 11, 2018
@egamma egamma added this to the January 2018 Recovery milestone Feb 11, 2018
@aeschli
Copy link
Contributor

aeschli commented Feb 12, 2018

The newly defined indentationRules look fine and useful to me.

The problem is caused by the "editor.autoIndent" feature. It results in different behaviour when indentationRules are defined vs. undefined. It behaves as disabled when no rules are defined.

IMO the correct fix is to turn off indent on paste for YAML. Indentation defines the structure of a YAML program and the user typically very consciously at with a certain indentation. By modifying it, we change the users intent.

{
	"[yaml]": {
		"editor.autoIndent": false
	}
}	

@rebornix What do you think?

@sandy081 sandy081 added bug Issue identified by VS Code Team member as probable bug and removed candidate Issue identified as probable candidate for fixing in the next release labels Feb 12, 2018
@rebornix
Copy link
Member

@aeschli thanks for investigating this issue for me, the change looks good to me.

@rebornix rebornix self-assigned this Feb 12, 2018
@aeschli
Copy link
Contributor

aeschli commented Feb 12, 2018

@rebornix Can you push it to release/1.12 as well?

@Tyriar Tyriar added the verified Verification succeeded label Feb 13, 2018
@gregvanl gregvanl changed the title Incorrect auto intend YAML files Incorrect auto indent YAML files Feb 14, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants