[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indentation.
From: |
Malte Spiess |
Subject: |
Re: Indentation. |
Date: |
Fri, 27 Oct 2006 20:01:29 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Markus Triska <triska@gmx.at> writes:
> zombek@gmail.com writes:
>
>> 1) 4 space indentation (no mather which language) and it shouldn't care
>> about the syntax - when I say indent then indent
>
> Add this to the modes in which you want 4 spaces when you press TAB:
>
> (local-set-key "\t" (lambda () (interactive) (insert " ")))
I have to say that I don't think that this is a very good idea since
every other function that has to do with indentation will ruin your
setup. (indent-region,...)
You should stick to what Sam has recommended and maybe think your intend
over.
I guess that there are some modes in which an indentation of 4 is really
not a good idea, like LaTeX mode or html stuff (ymmv). Plus I don't
think that this is a easy to accomplish feature. I would recommend a
more precise setup for each mode. The modes for c-like-languages can be
changed all in one step.
>> 2)when I press RETURN when beeing on some indentation level i should
>> automatically go to the same indentation level in the new line without
>> the need to press TAB
>
> (global-set-key "\C-m" 'newline-and-indent)
This can be a good idea anyway. But keep in mind that C-j already does this.
Greetings
Malte