fixed auto-indentation mode for Emacs?

fixed auto-indentation mode for Emacs?

Post by tom » Sat, 20 May 2000 04:00:00



A while ago, I thought I saw a mode that provided fixed
autoindentation for Emacs, similar to what "vi" has.  That is, unlike
indented text mode, where adding indentation goes to the next
whitespace character in the previous line, in fixed auto indent mode,
adding extra indentation always adds a fixed amount.

I'd be interested in something like that because I edit a lot of mixed
programming language text and the language aware modes simply don't work
reliably enough.

So, if you know where I can find such a mode (or whether it's
just a simple setting), I'd appreciate if you could let me know
(posting is fine; if I get E-mail, I'll summarize).

Tom.

 
 
 

fixed auto-indentation mode for Emacs?

Post by Xavier Decore » Sat, 20 May 2000 04:00:00



Quote:> A while ago, I thought I saw a mode that provided fixed
> autoindentation for Emacs, similar to what "vi" has.  That is, unlike
> indented text mode, where adding indentation goes to the next
> whitespace character in the previous line, in fixed auto indent mode,
> adding extra indentation always adds a fixed amount.

> I'd be interested in something like that because I edit a lot of mixed
> programming language text and the language aware modes simply don't work
> reliably enough.

> So, if you know where I can find such a mode (or whether it's
> just a simple setting), I'd appreciate if you could let me know
> (posting is fine; if I get E-mail, I'll summarize).

> Tom.

You'll find everything you want in Info pages:
C-h i d m Emacs RET m Indentation RET

In brief, the command you search for are

`C-x <TAB>'
     Shift block of lines rigidly right or left (`indent-rigidly').

`M-i'
     Indent from point to the next prespecified tab stop column
     (`tab-to-tab-stop').
     *TAB's can be edited by edit-tab-stops*

`M-x indent-relative'
     Indent from point to under an indentation point in the previous
     line.

--
+------------------+--------------------------------------------------------+
| Xavier DECORET   | iMAGIS, Laboratoire GRAVIR/IMAG  (CNRS,INRIA,INPG,UJF) |
|                  | INRIA Rhone-Alpes, 655 Av de l'Europe, 38330 Montbonnot|
| Doctorant        | France. Tel: +33 4 76 61 54 58 - Fax: +33 4 76 61 54 40|
+------------------+--------+-----------------------------------------------+

+---------------------------+-----------------------------------------------+