[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs newbie - Syntax Highlighting and Indentation
From: |
Jiri Pejchal |
Subject: |
Re: Emacs newbie - Syntax Highlighting and Indentation |
Date: |
Fri, 14 Nov 2003 17:48:10 GMT |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
David Rasmussen <david.rasmussen@gmx.net> writes:
> I've installed the Windows version of Emacs 21.3.1.
> I have read some tutorials, but I have two questions (for now):
>
> 1) How do I enable syntax highlighting by default, for any type of
> file / extension / mode that supports it? I have enabled it in the
> Options menu, and saved my options. But isn't there a non-menu-way
> of doing this, so I can get to learn and understand how to
> configure emacs myself?
Put (global-font-lock-mode 1) in your .emacs (maybe it's _emacs on
Windows) -- that is configuration file for Emacs. (You don't have to do
it if you have saved the options).
Start with Control-h t --> tutorial
Then you can start reading manual: Control-h i Emacs RETURN
>
> 2) When I edit a java file, the Java major mode i automatically
> loaded. But when I press TAB at the beginning of a new line, i get
> an indentation of 4 spaces. How do I alter this to 2 spaces
(setq c-basic-offset 2)
> instead? Or any other number of spaces? What if I want to get a tab
> character instead of spaces, when indenting (I really don't, but I
> would like to know)?
Everything is possible, just read the manual:-)
--
Jiri Pejchal