[Courses] Re: Courses digest, Vol 1 #60 - 1 msg

Akkana akkana at shallowsky.com
Tue Mar 19 10:30:53 EST 2002


> On Tue, Mar 19, 2002 at 02:30:54AM +0600, phiber2001 wrote:
> > And there's 
> > a vi tutor called vim is there anything like that for emacs? 

Jillian-Beth Stamos-Kaschke writes:
> According to 
> http://www.lisa.univ-paris12.fr/linux/emacs_basic.htm ,
> Emacs has a tutorial too, which is invoked by issuing the command
> "C-h C-t". 

If for some reason your emacs doesn't give you a help prompt when you
type ctl-h (perhaps because you have a different set of keybindings),
type this: ESC x help-with-tutorial.  It's a pretty good tutorial.

> I'm sure it has syntax highlighting (it has all manner
> of things built in), but I have no idea whether that can be turned
> on or off by a simple command or by entering the appropriate Emacs 
> mode to the language you're using (which would be Tcl in this case).

With xemacs, at least, it has to do with the "font-lock" package. 
There may be an easier way to turn on syntax highlighting, but this
in your .emacs should enable it:

  (setq-default font-lock-use-colors '(color))
  (require 'font-lock)

and then you can change colors like this:

(set-face-foreground 'font-lock-comment-face "blue")
(set-face-foreground 'font-lock-keyword-face "darkorange")
(set-face-foreground 'font-lock-preprocessor-face "darkred")
(set-face-foreground 'font-lock-string-face "purple")
(set-face-foreground 'font-lock-type-face "purple")
(set-face-foreground 'font-lock-variable-name-face "darkgreen")
(set-face-foreground 'font-lock-function-name-face "red")

and so forth.  (If that doesn't work or if you want more .emacs
examples, contact me and I'll send you mine.)

XEmacs does have a tcl mode: I tried opening /usr/bin/tkdiff in xemacs,
and it automatically loaded Tcl mode and colorized some things
(comments and strings, procedure names, and some keywords).

	...Akkana



More information about the Courses mailing list