From: Yuri Shtil <yshtil@cisco.com>
Subject: Re: Indentation in C
Date: Wed, 21 Jan 2004 13:46:32 -0800 [thread overview]
Message-ID: <400EF338.8010408@cisco.com> (raw)
In-Reply-To: d0bf4554.0401211337.6ad86953@posting.google.com
Varun Sinha wrote:
> I was wondering how I could get the following done in EMACS-
>
> 1) When I hit tab to indent, I'd like the tab to be made up of spaces.
> I love the way I can hit tab anywhere on a line, and it indents the
> line according to the specifications and I don't want to lose that.
> The indentation should be two spaces. I was trying some of the
> options, but when (I think) I replaced the tabs with spaces, I lost
> the ability to tab anywhere in the line and get indentation.
>
> 2) Right now, the curly braces are indented two spaces below the
> function call or the control statement, like so
>
> function_name
> {
> .........
> .........
> }
>
> but I need the curly braces to not be indented like so
>
> function_name
> {
> ...........
> ...........
> }
>
> I tried looking through the documentation for EMACS to get these, but
> I wasn't able to make sense out of it. Ordinarily, it wouldn't matter
> to me, but the professor for my course has laid down these standards.
> I tried asking him and the TA, but they all use VI and told me either
> to switch (yeah right) or use manual spacing.
>
> Thanks a lot!!
>
> Varun
Look up the variable indent-tabs-mode.
next prev parent reply other threads:[~2004-01-21 21:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-21 21:37 Indentation in C Varun Sinha
2004-01-21 21:46 ` Yuri Shtil [this message]
2004-01-21 22:03 ` Andrew Taylor
2004-01-22 11:21 ` Vivek Dasmohapatra
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=400EF338.8010408@cisco.com \
--to=yshtil@cisco.com \
/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).