oakenshield1
oakenshield1

Reputation: 871

Is there a quick way in Emacs to word wrapping?

Is there a quick and easy way to word wrap like "Apply Word Wrap" function of KDE's Kate?

Upvotes: 1

Views: 119

Answers (2)

user797257
user797257

Reputation:

While the mishadoff's answer is great for default word wrapping, I once had to re-implement it because I wasn't content with the way Emacs did it, so I tried to scratch the bits of it together and here it is: http://pastebin.com/75q65hRf in case you need it.

With that bit of code you can configure what characters to wrap on, what characters terminate words, and also set exception rules for when the characters that would've otherwise break the line won't do it. It may also pad the created column on the right and on the left (I was using this function to format and display documentation text).

Upvotes: 1

mishadoff
mishadoff

Reputation: 10789

  • Enter to wrapping mode = M-x auto-fill-mode
  • Wrap text = select text -> M-q

Upvotes: 5

Related Questions