From: Emanuel Berg via help-gnu-emacs <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Indenting with the tab key like everyone else
Date: Tue, 04 Jun 2019 03:19:21 +0200 [thread overview]
Message-ID: <86r28axi3q.fsf@zoho.eu> (raw)
In-Reply-To: 1019418503.3900238.1559510385829@mail.yahoo.com
R. Diez via help-gnu-emacs wrote:
> I want the same behaviour as most other IDEs
> I know: If I just press tab, it should
> "intelligently" indent the current line of
> code as usual. But if I select several lines
> with the shift key, I want to rigidly indent
> the selected block of lines. At the moment,
> Emacs tries to reindent the selected lines,
> which often does nothing, because it thinks
> the lines are already properly indented.
TAB is the "intelligent" way and that works for
regions as well. This makes sense IMO.
If you want to just mechanically move a region
forward or backward, first set the region, then
do
`C-u C-x TAB' for 4 steps
`C-u C-u C-x TAB' for 4**2=16 steps (and so on),
and for arbitrary values, do, e.g.,
`C-u 3 C-x TAB' for 3 steps (and so on).
You can also do `C-u -2 C-x TAB' to move back
two steps, for example.
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
next prev parent reply other threads:[~2019-06-04 1:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1019418503.3900238.1559510385829.ref@mail.yahoo.com>
2019-06-02 21:19 ` Indenting with the tab key like everyone else R. Diez via help-gnu-emacs
2019-06-04 1:19 ` Emanuel Berg via help-gnu-emacs [this message]
2019-06-04 4:29 ` YUE Daian
2019-06-25 8:09 ` R. Diez via help-gnu-emacs
2019-07-01 4:29 ` YUE Daian
2019-07-16 7:23 ` R. Diez
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86r28axi3q.fsf@zoho.eu \
--to=help-gnu-emacs@gnu.org \
--cc=moasenwood@zoho.eu \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).