Skip to content

Add support for mixed tab/spaces indentation #5394

@eladts

Description

@eladts

Traditional Unix editors (emacs, vim etc) use a mix of tabs and spaces for indentation. The tab length is always assumed to be 8 and if the indentation size is different, indentation is created by inserting as much tabs as possible and inserting spaces for the remainder. Right now, in order to view such files correctly one needs to set the tab size to 8, convert the file to use only spaces and then set the indentation size to the correct value. However, when working on legacy code it is desired to keep the indentation method the same to avoid unnecessary commits. Therefore VSCode should support this method of indentation, auto detect it and allow to easily convert from and to it.

  • VSCode Version: 1.0.0
  • OS Version: OS X 10.11.4

Steps to Reproduce:

  1. Load a file with mixed indentation
  2. VSCode won't display the file correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    editor-coreEditor basic functionalityeditor-renderingEditor rendering issuesfeature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions