[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: auto-indent in emacs

From: harven
Subject: Re: auto-indent in emacs
Date: Mon, 30 Nov 2009 16:26:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Kenneth Brun Nielsen <address@hidden> writes:

> I want to auto-indent a section (actually a whole file) in Emacs.
> I googled, that the shortcut C-M-\ ("CTRL+ALT+backspace") does the
> job, but since I have a danish keyboard, where "backspace" requires me
> to push the META-button "Alt Gr", it seems I'm not able to push this
> combination.
> Any suggestions for another way to auto-indent?
> Best regards,
> Kenneth

C-M-\ runs the command indent-region (check it by typing C-h k C-M-\).
So bind that command to another shortcut. For example, to bind it to C-c i  
put the following line in your .emacs

(global-set-key (kbd "C-c i") 'indent-region)

C-c followed by a letter are user reserved bindings.
And for indentation, have a look at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]