From: harven <harven@free.fr>
To: help-gnu-emacs@gnu.org
Subject: Re: auto-indent in emacs
Date: Mon, 30 Nov 2009 16:26:33 +0100 [thread overview]
Message-ID: <87tywc9gpi.fsf@ergodik.univ-brest.fr> (raw)
In-Reply-To: 6bd43112-0ffd-482a-be72-0cbb579ed1b8@o13g2000vbl.googlegroups.com
Kenneth Brun Nielsen <kenneth.brun.nielsen@googlemail.com> 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
http://www.emacswiki.org/emacs-en/CategoryIndentation
next prev parent reply other threads:[~2009-11-30 15:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 15:10 auto-indent in emacs Kenneth Brun Nielsen
2009-11-30 15:22 ` Kenneth Brun Nielsen
2009-11-30 15:26 ` harven [this message]
2009-11-30 15:58 ` Lennart Borgman
2009-11-30 16:48 ` Sebastian Rose
2009-11-30 17:06 ` Lennart Borgman
2009-11-30 18:11 ` Lennart Borgman
2009-11-30 19:22 ` Lennart Borgman
2009-11-30 21:05 ` Sebastian Rose
2009-11-30 17:26 ` Dan Nicolaescu
2009-11-30 19:20 ` Davis Herring
2009-11-30 19:23 ` Dan Nicolaescu
2009-11-30 19:39 ` Davis Herring
2009-11-30 19:44 ` Lennart Borgman
2009-11-30 20:08 ` Dan Nicolaescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tywc9gpi.fsf@ergodik.univ-brest.fr \
--to=harven@free.fr \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.