Skip to content

Can't find the settings for YAML tab/indent size #69011

Closed

Description

@devuxer
  • VSCode Version: 1.31.1
  • OS Version: Windows 10

Related Issues

Steps to Reproduce

  1. In preferences > settings, set the following values:
    • Editor: Tab Size = 4
    • Editor: Insert Spaces = On
    • Editor: Detect Indentation = Off
  2. Open a .yml file
  3. Note that "Spaces: 2" appears in blue footer bar and guide lines appear every 2 characters (see image below).
  4. Set Spaces to 4 in blue footer bar.
  5. Close and reopen .yml file.

Observed Results

  • "Spaces" has reverted back to "2" in blue footer bar
  • Guide lines once again appear every 2 characters

2019-02-19 14_53_48-docker-compose yml - sdtf workspace - visual studio code

Expected Results

  • The tab size should always be 4 and not need to be reset since "detect indentation" is off.
  • Resetting "Spaces: 2" to "Spaces: 4" should stick.

Does this issue occur when all extensions are disabled?: Yes

Activity

  1. changed the title [-]YAML tab *still* [/-] [+]YAML tab/indent size *still* not working properly[/+] on Feb 19, 2019
  2. added
    editor-autoindent
    on Feb 19, 2019
  3. aeschli commented on Feb 21, 2019

    @aeschli
    Contributor

    Yaml has language specific default settings that wins over global settings:

    	// Configure editor settings to be overridden for [yaml] language.
    	"[yaml]":  {
    		"editor.insertSpaces": true,
    		"editor.tabSize": 2,
    		"editor.autoIndent": false
    	},
    

    You'll have to add a similar section to your user settings.

  4. devuxer commented on Feb 21, 2019

    @devuxer
    Author

    Martin Aeschlimann (@aeschli),

    Interesting, thank you.

    Is this documented anywhere? It seems almost completely undiscoverable within VSCode. When I search the available settings using Preferences > Open Settings (UI), nothing appears for "yaml" or "yml".

    I now see that if I search for "tabsize", there's a little note at the bottom that directs you to edit the settings JSON file. This is barely noticeable, though.

    Why aren't the YAML settings integrated into the settings UI?

  5. aeschli commented on Feb 22, 2019

    @aeschli
    Contributor

    Reopening and renaming as a request to improve the settings UI.

  6. changed the title [-]YAML tab/indent size *still* not working properly[/-] [+]Can't find the settings for YAML tab/indent size[/+] on Feb 22, 2019
  7. added
    settings-editor
    and removed
    editor-autoindent
    on Feb 22, 2019
  8. roblourens commented on Feb 22, 2019

    @roblourens
    Member
  9. added
    *duplicate
    on Feb 22, 2019
  10. locked and limited conversation to collaborators on Apr 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

*duplicatesettings-editor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions