Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the default width of fill mode to 80 with emacs?

Tags:

emacs

I know that "C-u 80 C-x f" sets the fill width 80, and M-q adjusts it. How to make it default? I mean, how to make width 80 deafault for fill width?

like image 772
prosseek Avatar asked Aug 25 '10 14:08

prosseek


People also ask

How do I set fill columns in Emacs?

The easiest way to set fill-column is to use the command C-x f ( set-fill-column ). With a numeric argument, it uses that as the new fill column. With just C-u as argument, it sets fill-column to the current horizontal position of point.

What is fill column indicator?

The fill-column indicator is a useful functionality especially in prog-mode and its descendants (see Major Modes) to indicate the position of a specific column that has some special meaning for formatting the source code of a program.

What is fill paragraph?

The command M-q ( fill-paragraph ) fills the current paragraph. It redistributes the line breaks within the paragraph, and deletes any excess space and tab characters occurring within the paragraph, in such a way that the lines end up fitting within a certain maximum width.


1 Answers

In your .emacs place (setq-default fill-column 80) Or you can just use M-x customize-variable on fill-column, and it will set it and save it for you using the standard customize interface.

like image 173
NikkiA Avatar answered Sep 22 '22 23:09

NikkiA