YamlDotNet.Editor icon indicating copy to clipboard operation
YamlDotNet.Editor copied to clipboard

How can we configure how much we want to indent?

Open Kimi-Arthur opened this issue 8 years ago • 4 comments

Indent with 2 spaces looks better to me than 4. So I really would like a configuration to alter that based on personal interest.

One good place to put it the configuration under Options > Text Editor > YAML, which seems to be standard place for indent config. But sadly, YAML doesn't have an entry there.

Kimi-Arthur avatar Dec 22 '16 18:12 Kimi-Arthur

I built a personal version forcing the intent size to 2. https://github.com/dplusic/YamlDotNet.Editor/releases/tag/v1.6.2-2spacedtab

dplusic avatar Apr 29 '17 10:04 dplusic

Great! Will try it sometime. Thanks!

Kimi-Arthur avatar Apr 29 '17 14:04 Kimi-Arthur

Sorry to comment only now. I'd like to offer that option, but I have no idea on how to add options pages in the settings. I couldn't find any documentation, and what I was able to implement was based on other projects' source code... If anyone knows how to do this, let me know or submit a pull request if you are able. Thanks

aaubry avatar Apr 30 '17 20:04 aaubry

@aaubry I know even less about these plugins than you so I won't be much help getting it to work, but the EditorConfigLanguage plugins looks like it could be a good reference. That adds EditorConfig under Options > Text Editor which has a section for Tabs like all of the others.


Maybe that won't be much help, it looks like VS2017 supports them out of the box which is probably why they're listed under Options > Text Editor.

xt0rted avatar Apr 30 '17 21:04 xt0rted