Skip to content

Multi-line indents do not preserve partial indents #15598

Closed

Description

  • VSCode Version: 1.7.1
  • OS Version: macOS Sierra 10.12.1

I'm using VSCode for Clojure editing right now and have been running into this issue a lot. This seems to be a general problem with VSCode's indentation mechanism though, and not a language specific problem. I've also verified that it's reproducible on the latest master build without any extensions or customizations applied.

Steps to Reproduce:

  1. Set indentation to 2 spaces
  2. Paste the following into an empty editor:
  {:key1 :value1
   :key2 :value2}
  1. Select both lines and press tab

Expected:

Both lines are indented by the standard indentation size of 2 spaces. This is the standard behavior in Atom, as well as most other editors I've worked with:

nov-16-2016 15-33-50

Actual:

Both lines are indented to the same indentation level, and the partial indent on the second line is discarded:

nov-16-2016 15-16-03

I tried poking around in the source code a bit but couldn't quite figure out where this functionality lives. If someone could just point me in a general direction, I can try giving it another shot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

editor-autoindentEditor auto indentation issuesfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions