From: Adam Hardy <emacs@cyberspaceroad.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Indent and CSS
Date: Thu, 18 Dec 2003 12:28:46 +0100 [thread overview]
Message-ID: <3FE18F6E.5020607@cyberspaceroad.com> (raw)
In-Reply-To: <87r7z318s1.fsf@emptyhost.emptydomain.de>
On 12/17/2003 09:36 PM Kai Grossjohann wrote:
> digits <digits@gentoo.se> writes:
>
>
>>I'm all fresh on Emacs, I have now tried to get Emacs to intent in CSS
>>files all day and I can't get it to work.
>
>
> Did you look for a css Emacs mode? www.emacswiki.org might be a good
> starting point, as might be the Emacs Lisp List.
>
>
>>This is what I want:
>>body {
>><tab>font-size: 10px;
>>}
>>
>>h1 {
>><tab>font-weight: bold;
>>}
>
>
> If you have a css mode, then you need to tell it to use an indentation
> step of N and you also need to set tab-width to the same N. (Usually,
> the indentation step is 2 or 4 but tab-width is 8 by default.) And
> you need to set indent-tabs-mode to t, but that's the default.
>
>
>>I know that I can get return-and-indent with C-j, but I would like to
>>have it bound to RET when on a line with { as last char.
>
>
> Isn't it enough to always have RET do like C-j? Why do you want RET
> to behave differently if the last char is something else?
>
> (require 'css-mode)
> (define-key css-mode-map (kbd "RET") 'newline-and-indent)
>
> Maybe you need to change css-mode and css-mode-map, depending on the
> actual css mode that you are using.
one css mode:
http://camalott.com/~jtpolk/emacs.html
--
GNU Emacs 21.3.1 on Linux 2.4.20 Debian
prev parent reply other threads:[~2003-12-18 11:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-27 18:44 Indent and CSS digits
2003-12-17 20:36 ` Kai Grossjohann
2003-12-18 11:28 ` Adam Hardy [this message]
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=3FE18F6E.5020607@cyberspaceroad.com \
--to=emacs@cyberspaceroad.com \
--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.