I’ve been using Atom now as both a code editor and a plaintext editor. I manually break my lines at X chars (80 or 100, depending on what setting I’m in), or I use autoflow package to do it incrementally. I’ve been looking for a package that does this, a found one called Wraptor, however, it seems to only work half as I would expect. I’m not sure if there are others or not, but I can’t seem to find much.
- Automatically break lines at the current preferred line length. If a word is too long and crossing the PLL, it will insert the break before that word.
- It could intelligently re-break lines if you are inserting words into lines that were previously written. Say you just wrote a paragraph of text, and the package has been breaking the lines all along, but you realize you need to fix a line and it causes a new break to occur, Atom should remove and add breaks on the remaining lines until it is formatted properly again.
- Should insert the typist’s / coder’s preferred newline character.
- Be efficient at doing all of this.
- Have an option in the settings to choose which file types it would automatically apply to.
I think I’m going to take a crack at this, but I’m not entirely confident in myself for this sort of a project, as I only us JS in the context of making simple Atom packages. Any helpful hints or tips for the algorithm or structure of this package would be helpful and if anyone else is interested in helping out, I would gladly take PRs or step aside for someone else to make it.