15

There are (in my mind) two types of word wrapping:

  • Hard : Actually edit the file to have lines of a maximum length
  • Soft : Just wrap in the editor, but the underlying file still has long lines.

I can't figure out how to make Emacs do these two different types of word wrapping (most people just talk about "word wrap", without distinguishing which they are talking about).

Chris Jefferson
  • 253
  • 2
  • 6
  • 3
    Emacs uses the term "fill" for hard wrapping. – npostavs Sep 23 '16 at 12:14
  • 3
    `C-h r` to visit the Emacs manual. Then `i wrap TAB RET`. That completes `wrap` to `wrapping` and then visits the part of the manual (node [Continuation Lines](http://www.gnu.org/software/emacs/manual/html_node/emacs/Continuation-Lines.html)) that talks about this. In that node you also find a link to node [Visual Line Mode](http://www.gnu.org/software/emacs/manual/html_node/emacs/Visual-Line-Mode.html), which talks about your "soft" wrapping. – Drew Sep 23 '16 at 16:20

1 Answers1

22

Emacs uses visual-line-mode for the soft-wrap and auto-fill-mode (and/or refill-mode) for the hard-wrap. See What is the difference between refill-mode and auto-fill-mode? for the difference between the two.

Keith Pinson
  • 269
  • 1
  • 3
  • 25
Stefan
  • 26,154
  • 3
  • 46
  • 84