de-jcup / eclipse-yaml-editor

Eclipse YAML editor
https://marketplace.eclipse.org/content/yaml-editor
Apache License 2.0
34 stars 10 forks source link

out/indent should align 1st char on existing boundaries and not just insert/remove N spaces #98

Closed elonderin closed 1 year ago

elonderin commented 3 years ago

when using the indent operations with TAB and shift+tab on non-commented lines, then the 1st char of the line should always be aligned according to existing context

Currently, when out/indenting: the 1st char is just moved N chars according to the current config to the left/right which may produce broken yaml if the existing yaml has used different indent sizes OR in connection with #97.

In a sense this is not just anymore an indent function but more like a fix indent function.

Anyhow: i'd use the config'ed indent size only for the 1st line under a non-indent line and otherwise resort to whats there already, unless that line has a problem marker wrt. to indenting.