Vscode: Allow files.eol as language specific option

Created on 23 Nov 2017  路  6Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.18.1
  • OS Version: Windows 10

Steps to Reproduce:

These are my current user settings

{
    "explorer.openEditors.visible": 0,
    "workbench.activityBar.visible": false,
    "editor.minimap.enabled": false,
    "editor.renderWhitespace": "all",
    "[php]": {
        "files.eol": "\n",
        "files.encoding": "utf8",
        "editor.tabSize": 4,
        "editor.insertSpaces": true,
        "files.insertFinalNewline": true,
        "files.trimFinalNewlines": true
    }
}
  1. The setting "files.eol": "\n" isn't working. Every time I create or open a PHP file I want the line setting to be LF but Visual Code continues to put CRLF. Also I observe a strange error that I can't understand as we can observe on the image.
    captura de ecra 5

My conclusion is that the end of line option isn't working properly when using a specific language.

editor-core feature-request file-io on-testplan

Most helpful comment

"files.eol" need to become a language scopable setting.

All 6 comments

This is JSON. You need to escape that backslash with another backslash:

"\\n"

Actually I'm wrong... sending it to the right person.

"files.eol" need to become a language scopable setting.

Challenge is that when the model is being created, it just gets text/plain as mode because the actual mode is a promise that can load later. Thus, configuration that relies on the proper mode to be there will not be acknowledged initially.

This seems to be a duplicate of #34876

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philipgiuliani picture philipgiuliani  路  3Comments

vsccarl picture vsccarl  路  3Comments

ryan-wong picture ryan-wong  路  3Comments

omidgolparvar picture omidgolparvar  路  3Comments

shanalikhan picture shanalikhan  路  3Comments