Automatic enter indentation in offside folding languages #171040
Open
Description
opened on Jan 11, 2023
If you code in a language like TypeScript and you press enter in an unindented line inside a block, VSCode will automatically indent the line to the current level:
If you do the same thing in Python, it doesn't work.
This makes some sense if you are below a block, because you might want to start some new block. However, if there is still a line with the same indentation as the current block after your cursor, I would like to have it automatically indented. It shouldn't be too hard, because we already have the indentation guides (the grey lines), and those could maybe be used to automatically indent the cursor while being inside a block. Note how the line stops at the second print call:
Activity