vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Typing enter after |> does incorrectly creates a new list entry

Open ssbarnea opened this issue 2 years ago • 2 comments

Describe the bug

Typing enter after > does incorrectly creates a new list entry.

Expected Behavior

Pressing enter after any of >, |. >- or |- should just add a single newline with a +1 indent level, because that is what multi-line strings are expecting.

Current Behavior

some-sequence:
  - foo
  - |

Now, go to last line and press enter, you will get

some-sequence:
  - foo
  - |
  - 

The expectation is that the user will enter a multi line string, so no - should be added, and only spaces indentation should be added.

ssbarnea avatar Mar 22 '22 07:03 ssbarnea

@msivasubramaniaan can you please check this out?

gorkem avatar Mar 25 '22 20:03 gorkem

@ssbarnea may I know the version which you are using, The latest version didn't add - Please refer the screenshot image

If you need the space indentation, please enable Editor: Format On Type setting

msivasubramaniaan avatar Mar 29 '22 07:03 msivasubramaniaan