hard wrap text in the editor
It would be nice if the editor would hard wrap the text after a (configurable) textwidth.
I usually edit text in vim in a terminal, but downloading a .tex file edited in writelatex has very long lines of text that I then have to reformat.
If you’d like this to make it easier to work with vim mode, you might also be interested in http://support.overleaf.com/forums/137318-feedback/suggestions/5487527-extend-the-vim-editing-mode-to-allow-jk-movement-o
Garrett Mitchener commented
Incidentally, having more line breaks stored in the .tex file should improve interaction with git. diffing and merging of files is normally done on a line-by-line basis, and having each paragraph stored as a single line makes that harder to do.
Thanks for your comments, everyone.
For fellow vim users, it's worth noting that you can use the g modifier with movement commands to move within visual (soft) wrapped lines, so gj, gk, etc. will do what you expect. There is another suggestion to provide an option to make movement keys always behave this way:
which seems like it would solve a lot of the problems with soft wrapping for vim users.
Another workaround that's popular with users of git and other version control systems is to put one sentence per line, but many people do not seem to like this.
We've considered several ways of implementing a hard line wrap, but we've not found a nice solution that works well on all of the screen sizes we have to support and in a collaborative setting with multiple users working concurrently. So, I'm increasingly leaning toward the vim configuration option above, rather than a hard wrap. I'll change this to Under Review, which is more accurate.
Nathan Crock commented
Yes, this was planned in 2013? Our entire lab uses vim and we are planning to migrate to a group licence to better manage our publications. However, vim mode is impractical without this functionality.
Let us keep bumping this thread until this minor request is addressed.
Hi, I'd also find this very useful indeed. Any news on progress?
Brien Elwood Washburn commented
It would be great if the normal wrapping in Overleaf could be set so you can resize the window without causing significant issues with line breaks. I can't think of any issues at the moment that this functionality would cause with Vim, and it would make the use of Vim truly viable in Overleaf.
Manually hitting enter at the end of every line (which depends on the current size of the partition between the input and view windows) makes it too irritating to use Vim. Honestly, I'm not sure how others get past it. You slow down incredibly having to search through each line to makes edits as you can't use commands such as G effectively anymore.
It seems that the implementation of gq and then an automatic application of gq when the window is resized would solve this issue.
Everything else has been great so far. Thanks for bringing Vim to Overleaf! Hopefully it will be more viable soon.
It would be very convenient if there is some magic wrapping of long lines to say 80 chars. This is useful when working from multiple sources on the project through the awesome git interface.
Kyle Boone commented
I would really like this feature, and I second the request for gq commands in vim mode. They are incredibly useful for keeping text in a readable format.
Dylan Jayatilaka commented
Please do this ... it is a pain without a hard wrap.
Are you using CodeMirror? If so, this is dealt with through an add-on. Could it be integrated?
Thanks for Overleaf, by the way. Loving it so far.
Spencer Bliven commented
Implementing the gq commands in vim-mode would be a nice solution to this.