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
Line indent doesn't handle leading whitespace properly #1620
Indenting a line with leading whitespace seems to have some corners that need ironing out. It appears to be attempting something smart about tab-stop alignment, but it should really just be dumb and indent all lines the same.
e.g.
Right-justified tabular data is affected by this (e.g. output of many Powershell commands, or the robocopy usage message)
Maybe we should have an option for "dumbing down" the indent/unindent actions. Our thinking was to optimize them for source code, where mostly I'd say "leading whitespace aligned" lines are highly desirable.
I would recommend the default behavior be "dumb" block indenting (same as Visual Studio, Notepad++, every other editor), with an option "Block indent performs auto-formatting" or the like.
Even in source code this can be destructive/annoying. Unless every line is already aligned to a tab stop, stuff is liable to get jumbled. Certainly I like that my editor can auto-format for me when I ask it to, but I don't want it to do so during a bulk indent action.
Activity
alexdima commentedon Jan 14, 2016
Maybe we should have an option for "dumbing down" the indent/unindent actions. Our thinking was to optimize them for source code, where mostly I'd say "leading whitespace aligned" lines are highly desirable.
latkin commentedon Jan 14, 2016
I would recommend the default behavior be "dumb" block indenting (same as Visual Studio, Notepad++, every other editor), with an option "Block indent performs auto-formatting" or the like.
Even in source code this can be destructive/annoying. Unless every line is already aligned to a tab stop, stuff is liable to get jumbled. Certainly I like that my editor can auto-format for me when I ask it to, but I don't want it to do so during a bulk indent action.
alexdima commentedon Apr 5, 2017
The indentation commands will now respect the
editor.useTabStopssetting. In other words, to get this behaviour, seteditor.useTabStops: false.Fixes microsoft#1620: Indent commands respect `editor.useTabStops`