From: Tyler Smith <tyler.smith@mail.mcgill.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: a beginner's emacs troubles
Date: 30 Jul 2007 12:22:05 GMT [thread overview]
Message-ID: <slrnfarpem.mdh.tyler.smith@blackbart.mynetwork> (raw)
In-Reply-To: f8k7j2$8lp$02$1@news.t-online.com
On 2007-07-30, Mathias Häbich <m.haebich@gmx.de> wrote:
> f33ldead@gmail.com wrote:
>
>> * There's something strange with the way tab works in emacs. In cc
>> mode, I write a few letter then press and nothing happens! I'm not
>> allowed to put tabs anywhere on the file! I also tried editing an
>> empty file and I had no means of getting tab work!!! I just want my
>> tabs back!
>
> It's not strange at all if you know what function the TAB key is bound
> to. In cc-mode, it is c-indent-command, and in lisp-mode (the scratch
> buffer's mode) it is lisp-indent-line. (C-h k TAB tells you this - very
> useful!)
>
> What you want is probably tab-to-tab-stop, which is usually bound to M-i.
>
Before you start using tab-to-tab-stop, it might be worthwhile to play
around with how the regular tab/c-indent-command works. What it does
is automatically indent the current line according to a set of rules.
The result is that it provides an easy way to keep your code
consistently indented. It will know when you've entered a new code
block, loop, or conditional, and indent appropriately. If you don't
like the way it indents, there are way to customize the rules. I know
it's awkward at first, but I really like it now. It can actually be
handy in spotting syntax errors - a missing brace or semi-colon will
produce obviously incorrect indentation, alerting you that you've left
something out.
My 2 cents,
Tyler
next prev parent reply other threads:[~2007-07-30 12:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-29 22:48 a beginner's emacs troubles f33ldead
2007-07-30 0:08 ` roodwriter
2007-07-30 1:48 ` Daniel Leidisch
2007-07-30 4:10 ` Tyler Smith
2007-07-30 6:18 ` f33ldead
2007-07-30 7:56 ` Daniel Leidisch
2007-07-30 8:30 ` Mathias Häbich
2007-07-30 12:22 ` Tyler Smith [this message]
2007-07-31 1:02 ` f33ldead
2007-07-31 6:23 ` Kevin Rodgers
2007-07-31 16:25 ` don provan
2007-07-31 20:13 ` f33ldead
2007-07-31 22:45 ` Drew Adams
[not found] ` <mailman.4175.1185921962.32220.help-gnu-emacs@gnu.org>
2007-08-01 1:41 ` f33ldead
2007-08-01 8:59 ` Alan Mackenzie
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=slrnfarpem.mdh.tyler.smith@blackbart.mynetwork \
--to=tyler.smith@mail.mcgill.ca \
--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.
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).