randy3k / AutoWrap

Auto (Hard) Wrap for Sublime Text 2/3
MIT License
62 stars 8 forks source link

Wrapping doesn't happen when typing in the middle of a line #8

Closed simonzack closed 10 years ago

simonzack commented 10 years ago

It would be nice to be able to wrap while typing in the middle of the line, instead of only at the end of the line.

randy3k commented 10 years ago

I have been working to support this, but it requires some work. Meanwhile, you can use WrapPlus to manually wrap the lines.

simonzack commented 10 years ago

Thanks, that's good news. I do normally use wrap plus, but it's rather tedious to remember pressing alt-Q all the time. found your package and thought it would be a better replacement.

randy3k commented 10 years ago

Hi, have a look of https://github.com/randy3k/AutoWrap/tree/dev It is appreciated if you can help testing and also debugging.

simonzack commented 10 years ago

Thanks, this works well for wrapping the current line, and matches intellij behaviour (what I was testing it against).

Perhaps there could be an option to wrap paragraphs automatically as well as lines? Not sure how bad this will be on the runtime, maybe a "max lines to wrap after" option could help with slow performance, with the current method being 1, and with paragraph wrapping being infinity.

randy3k commented 10 years ago

I am not sure about wrapping paragraphs, I am afraid that there will be a lot of unexpected situations in runtime. I am not going to spend too much time on this as Wrap plus has better support for wrapping paragraphs.

simonzack commented 10 years ago

I'll see if I can come up with some code for this.

randy3k commented 10 years ago

The dev branch is merged into the master branch. I am planning to release it to package control after a few days.

randy3k commented 10 years ago

released