You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multi-line indents do not preserve partial indents #15598
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:
Set indentation to 2 spaces
Paste the following into an empty editor:
{:key1 :value1
:key2 :value2}
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:
Actual:
Both lines are indented to the same indentation level, and the partial indent on the second line is discarded:
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.
Reacted by Sam Harwell, Robin Munn, Roman Liutikov, Jan Niklas Hasse, Alexander Kahoun, Brent Jubinville, EFanZh and Harakku
Activity
normalser commentedon Nov 17, 2016
Something similar: #9409
ramya-rao-a commentedon Nov 17, 2016
alexandrudima Would this be tracked as part of #15598 or separate?
alexdima commentedon Nov 30, 2016
Today, indenting and unindenting always tries to "snap" the text to tab stops.
I think we could piggy back on the existing setting
editor.useTabStopsand "snap" the text to tab stops only when the setting is off.alexdima commentedon Aug 8, 2019
This works as expected when using
"editor.useTabStops": false.