This forum is no longer monitored. Please use www.overleaf.com/contact to get in touch.

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.

62 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Fernan Aguero shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    10 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Garrett Mitchener commented  ·   ·  Flag as inappropriate

        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.

      • AdminJohn Lees-Miller (Admin, writeLaTeX) commented  ·   ·  Flag as inappropriate

        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:
        http://support.overleaf.com/forums/137318-feedback/suggestions/5487527-extend-the-vim-editing-mode-to-allow-jk-movement-o
        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  ·   ·  Flag as inappropriate

        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.

      • Brien Elwood Washburn commented  ·   ·  Flag as inappropriate

        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.

      • Emile commented  ·   ·  Flag as inappropriate

        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  ·   ·  Flag as inappropriate

        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.

      Feedback

      Feedback and Knowledge Base