-
Notifications
You must be signed in to change notification settings - Fork 27
Reflow selection breaks indentation #31
Comments
It would be awesome if reflowing were a little more code-aware. I'm a heavy user of the |
This comment has been minimized.
This comment has been minimized.
I'm sorely missing the behavior of |
Really annoying behavior, makes the reflow pretty useless for long docstrings and text. :( |
I'm not positive if this is really still an issue for the people who originally reported it, but I was trying to find packages to fix this problem this evening and after a bit determined (by accident) that the default autoflow package actually works as we wish if you are careful how you make the selection. The key is how you start it. If you do this: You will get what you see in @izuzak's post. However, if you start like this: (note that the 1st line starts the selection all the way on the left) then it will wrap properly at 80 characters with the indentation for the entire block preserved. It's not obvious if the package is designed this way on purpose but, as long as you make sure the first line also includes the indentation of the final result you want it seems to work. |
This issue was moved to atom/atom#18026 |
From @danbim on July 1, 2015 10:1
If I have a block of text indented and I use the "reflow selection" command (cmd+alt+q on Mac) the resulting text block will only keep the intended indentation in the first line but lose it in the following lines. While for some file types this might be the correct behaviour, IMO for many others it's not. Therefore "reflow selection" is unusable for my source code.
If the current behaviour is still to be supported I suggest to make this a customizable behaviour, e.g., depending on file type.
Copied from original issue: atom/atom#7621
The text was updated successfully, but these errors were encountered: