How can I tell emacs to wrap lines at the 80th character?

I am looking for a solution I can put in /.emacs.

I put this in /.emacs but it doesn't work.

;; ========== Enable Line Numbering ==========                                         

(line-number-mode 1)

;; ========== Set the fill column ==========                                           

(setq-default fill-column 80)
  • fill-column controls paragraph reformatting (M-q, similar to Vim's gqap) and the automatic replacement of inserted spaces by (auto-fill-mode, similar to Vim's textwidth (I think)). Is that what you wanted? Or did you mean on-screen wrapping that doesn't affect the content of the file? – Gilles 'SO- stop being evil' Apr 9 '13 at 22:54

I think it's a typographical error?

It should be

(setq default-fill-column 80)

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.