Skip to content

Bounded Word Wrap does not work with Markdown Language #45653

Closed

Description

  • VSCode Version: 1.21.0
  • OS Version: Windows 10 Enterprise: Build 1703

Steps to Reproduce:

  1. Have settings to enable bounded word wrap such as:
    ...
    "editor.wordWrap": "bounded",
    "editor.wordWrapColumn": 80,
    ...
  1. Open/Create a Markdown language file
  2. Write some text that exceeds editor.wordWrapColumn
  3. Toggle word wrap on
  4. See that it does not wrap at editor.wordWrapColumn
  5. Shrink the VS Code window such that the window is thinner than text length
  6. See that it wraps at window bound
  7. Maximise window
  8. Change language (to Java for example)
  9. Repeat, and see that word wrapping works on editor.wordWrapColumn

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

Activity

  1. added
    editor-wrapping
    on Mar 13, 2018
  2. yume-chan commented on Mar 16, 2018

    @yume-chan
    Contributor

    Markdown language has it's own default value for editor.wordWrap, you can find it under the [markdown] key.

    Visual Studio Code supports you to set configuration to specified languages with this [languageId] syntax.

  3. HopefulLlama commented on Mar 16, 2018

    @HopefulLlama
    Author

    I was under the impression that not using the [languageId] syntax applies the settings to all languages. Is this incorrect?

  4. yume-chan commented on Mar 16, 2018

    @yume-chan
    Contributor

    Hammy Havoc (@HammyHavoc) Yes, but [languageId] block has higher priority, and there is a default value of editor.wordWrap defined for [markdown].

    Actually you made me thinking about is it not intuitive that a default value overriding a user value. Maybe the priority should be user [languageId] block -> user settings -> default [languageId] block -> default settings (If an extension really want the current behavior, it should add its [languageId] blocks to user settings).

  5. alexdima commented on Mar 29, 2018

    @alexdima
    Member

    Today, we ship with:

      "editor.wordWrap": "off",
      "editor.wordWrapColumn": 80,
      "[markdown]": {
        "editor.wordWrap": "on",
      }

    In order to change the settings for all files, including markdown you must write:

      "editor.wordWrap": "bounded",
      "[markdown]": {
        "editor.wordWrap": "bounded",
      }

  6. sandy081 commented on Apr 3, 2018

    @sandy081
    Member

    Simon Chan (@yume-chan) Interesting idea. But what would be priority when presence of workspace settings. Does the workspace settings override user [langId] settings too?

  7. added
    config
    under-discussion
    on Apr 3, 2018
  8. cesardramirez commented on Sep 10, 2018

    @cesardramirez

    File > Preferences > Settings

    {
        ...
        "editor.wordWrap": "bounded",
        "editor.wordWrapColumn": 100,
        "[markdown]": {
            "editor.wordWrap": "bounded",
        }
    }
    
  9. added
    info-needed
    and removed
    under-discussion
    on Sep 11, 2018
  10. sandy081 commented on Sep 11, 2018

    @sandy081
    Member

    Closing this as the fix is from the user side to provide language based settings to override.

  11. locked and limited conversation to collaborators on Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

configinfo-needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions