0

Is it possible to wrap text automatically at 80 column length? I mean, writing code or text and then, when I reach 80 characters, put a breakline and continue on the next line (not wrapping the word but putting on the next line).

Thank you!

2

You can customize fill-column or do (setq-default fill-column 80) in your init file and use auto-fill-mode.

You can activate it per mode by using (add-hook 'text-mode-hook 'turn-on-auto-fill) or with key binding: (global-set-key (kbd "C-c q") 'auto-fill-mode). See emacswiki for more.

  • I did it, but it doesn't work :( – captainepoch Jul 24 '16 at 11:21
  • Did you also try auto-fill-mode? – theldoria Jul 24 '16 at 11:23
  • Yes, and it only add spaces when the 80 characters are reached... – captainepoch Jul 24 '16 at 11:58
  • 1
    OP: Try starting from emacs -Q (no init file). If you still see a problem then provide a step-by-step recipe to reproduce it, saying what you see at each step and what you expected to see. If you do not see a problem, with emacs -Q, then recursively bisect your init file to find where you are introducing the problem. – Drew Jul 24 '16 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.