Good $daytime,

> Date: Sat, 13 Mar 1999 18:01:27 -0800
> From: Chris <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: vim or emacs c syntax

> I was wondering how to make vim do syntax highlighting for C code or
> emacs and how to set tabs for code.

Well, here are these for emacs:

Try `M-x font-lock-mode' to turn on syntax highlighting.  With newer
emacsen, it is also at 'Help/Options/Global Font Lock' menu item.
To learn more, run `info emacs` and find section named 'Font Lock'.

Emacs has special C/C++ mode that 'knows' these languages enough to
calculate indentations according to some predefined coding style.  In
short, 'c-basic-offset' contains common tab size, used for most
things, and 'c-default-style' tells what style (gnu, k&r, bsd, linux,
stroustrup).  You can try `C-c .' to change indentation style on a
file.  Open info page on 'ccmode' to learn more about these.

Hope this helps.

  Regards,
  Willy.

--
"No easy hope or lies        | Vitaly "Willy the Pooh" Fedrushkov
 Shall bring us to our goal, | Information Technology Division
 But iron sacrifice          | Chelyabinsk State University
 Of Body, Will and Soul."    | mailto:[EMAIL PROTECTED]  +7 3512 156770
                   R.Kipling | http://www.csu.ac.ru/~willy  VVF1-RIPE

Reply via email to