-
Notifications
You must be signed in to change notification settings - Fork 19
Don't strip trailing newlines when writing to disk #91
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
When writing long documents it's often nice to have the cursor/current line not right at the bottom of the window. Having removed the (very broken) typewriter mode from AE, the only way of achieving this is to add a bunch of newlines at the end of the doc... which is pretty common practice in loads of editors.
Astro Editor currently strips these training new lines when writing the file to disk, which Is every few seconds if autosave is on. We should not do this because:
- It prevents users doing the thing above.
- It feels janky and causes unexpected cursor movement etc.
- Most importantly... stripping trailing newlines is not a writer mode concern, it is a coder mode activity.
If users choose to strip trailing new lines before publishing they can do so in their code editor.
That said, we should ensure that at least one empty newline is Inserted at the end of the document when writing to disk, because that's just good practice.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working