[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a beginner's emacs troubles
From: |
Tyler Smith |
Subject: |
Re: a beginner's emacs troubles |
Date: |
30 Jul 2007 12:22:05 GMT |
User-agent: |
slrn/0.9.8.1pl1 (Debian) |
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
- a beginner's emacs troubles, address@hidden, 2007/07/30
- Re: a beginner's emacs troubles, roodwriter, 2007/07/29
- Re: a beginner's emacs troubles, Daniel Leidisch, 2007/07/29
- Re: a beginner's emacs troubles, Mathias Häbich, 2007/07/30
- Re: a beginner's emacs troubles,
Tyler Smith <=
- Re: a beginner's emacs troubles, address@hidden, 2007/07/30
- Re: a beginner's emacs troubles, Kevin Rodgers, 2007/07/31
- Re: a beginner's emacs troubles, don provan, 2007/07/31
- Re: a beginner's emacs troubles, address@hidden, 2007/07/31
- RE: a beginner's emacs troubles, Drew Adams, 2007/07/31
- Message not available
- Re: a beginner's emacs troubles, address@hidden, 2007/07/31