When using multi-line edit ([Alt]+[Shift]+[arrow keys] to select where and which line) and inserting a char into indented space auto indention is executed which wreck havoc with indention already defined. If multi-line cursor is released there is no way later to multi-line delete the change. This is extremely important in cases of indention sensitive formats like Python or YAML. Example below shows the issue (I know I can use [Ctrl]+[/] for toggle comment and it works but commenting is not the only case when multiple lines are edited and I have selected this example just for clarity.)
Example is shown on YAML file.
Steps shown below:
Create multi-line cursor at the beginning of multiple lines
Insert [#]
Cursor is released
Same as step 1
Deletion of one character [Del]
It removed only some of the "#" and Indention is broken even in places where they were removed
Now even if "#" is removed manually deleting just this one character in each line the indention is broken and differs from the initial one as shown below.
Environment
System Specs:
Zed: v0.163.2 (Zed)
OS: Linux X11 rocky 9.5
Memory: 125.5 GiB
Architecture: x86_64
GPU: NVIDIA RTX 5000 Ada Generation Laptop GPU || NVIDIA || 565.57.01
Suggestion for solution:
Allow disabling auto-indention in multi-line mode per format. E.g.
"languages": {
"YAML": {
"auto_indent_in_multiline_edit_mode": false,
}
}
Check for existing issues
Describe the bug / provide steps to reproduce it
When using multi-line edit ([Alt]+[Shift]+[arrow keys] to select where and which line) and inserting a char into indented space auto indention is executed which wreck havoc with indention already defined. If multi-line cursor is released there is no way later to multi-line delete the change. This is extremely important in cases of indention sensitive formats like Python or YAML. Example below shows the issue (I know I can use [Ctrl]+[/] for toggle comment and it works but commenting is not the only case when multiple lines are edited and I have selected this example just for clarity.)
Example is shown on YAML file.
Steps shown below:
Now even if "#" is removed manually deleting just this one character in each line the indention is broken and differs from the initial one as shown below.
Environment
System Specs: Zed: v0.163.2 (Zed) OS: Linux X11 rocky 9.5 Memory: 125.5 GiB Architecture: x86_64 GPU: NVIDIA RTX 5000 Ada Generation Laptop GPU || NVIDIA || 565.57.01
Zed configuration (~/.config/zed/settings.json): { "base_keymap": "Atom", "telemetry": { "diagnostics": false, "metrics": false }, "ui_font_size": 16, "buffer_font_size": 16, "theme": { "mode": "system", "light": "Solarized Dark", "dark": "One Dark", "tabWidth": 2, "useTabs": false }, "project_panel": { "dock": "left", "auto_fold_dirs": false }, "languages": { "YAML": { "prettier": { "bracketSpacing": false, "auto_indent_on_paste": false, "set auto_indent_using_last_non_empty_line": false } } } }
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log
``` ```