Don't remove whitespaces after pressing Enter #10075
Replies: 7 comments 15 replies
-
Fixed with (not quite but I'm trying to come up with a better way): "S-ret" = "open_above"
"ret" = "open_below" |
Beta Was this translation helpful? Give feedback.
-
No, it doesn't work actually and I don't know how to fix it with shortcuts |
Beta Was this translation helpful? Give feedback.
-
It's intended behavior and matches other editor like vim. I don't think adding an option for this is worth doing. |
Beta Was this translation helpful? Give feedback.
-
@pascalkuthe how to achieve this then? Vim is configurable enough for achieving this |
Beta Was this translation helpful? Give feedback.
-
Also see #5159 which discusses this. I don't understand when keeping trailing whitespace is a good thing, so I'd prefer we don't make this configurable. |
Beta Was this translation helpful? Give feedback.
-
@the-mikedavis formatters already remove all trailing spaces but when helix removes it after pressing Enter, it interferes with text editing. You can't just enter + move_line_up, you need to insert like 3 tabs or something or to exit to normal mode to execute a command |
Beta Was this translation helpful? Give feedback.
-
So I've been really trying out Helix today to finally replace VSCode, and having to manually re-add the indentation every time I move the cursor is driving me nuts. I honestly feel like I might be missing something fundamental about how other people edit their code. For example If my insertion cursor was already at the end of a block and I wanted to insert a new one, I'd hit I've gotten very used to just leaving blank lines indented to the proper depth because then there's never any surprises about where the cursor will be indented to on any given file when you move the cursor. A few extra (otherwise invisible) bytes is a small price to pay for that editing convenience. Having the proper indentation baked in is a godsend when stuck using a "dumb" editor too. I really expected Honestly, sans this one issue Helix seems to work great. It's lightning fast, well organized, and doesn't keep trying to convince me I need more AI. Would be a shame to drop it now for just this reason. :-\ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It's convenient to navigate indented code, it's better to implement an option that allows you to keep trailing spaces. Removing trailing spaces interferes with indentation and navigation
Beta Was this translation helpful? Give feedback.
All reactions