[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: keywords highlighting
From: |
Tim Johnson |
Subject: |
Re: keywords highlighting |
Date: |
Tue, 7 Feb 2006 14:56:25 -0900 |
User-agent: |
Mutt/1.4.2.1i |
* albrns <a_alnas@yahoo.com> [060207 11:59]:
> > kuvkir hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
:-) I think someone is having fun with Kirill
(I use both vim and emacs)
Kirill, I recommend that you do an appropos search on
"font" "font-lock", etc. As in C-h, a, "font-lock".
More advanced users can tell you what file extensions
that emacs "knows about automatically", in my case:
here is an example from my .emacs file:
;; python mode ===================================================
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(autoload 'python-mode "python-mode" "Turn on Python mode" t)
(add-hook 'python-mode-hook 'turn-on-font-lock)
;; and of course that is for python.
;; similarly, for javascript and rebol:
;; javascript mode
(add-to-list 'auto-mode-alist '("\\.js\\'" . javascript-mode))
(autoload 'javascript-mode "javascript-mode" "Turn on Javascript mode" t)
(add-hook 'javascript-mode-hook 'turn-on-font-lock)
;; rebol mode ====================================================
(add-to-list 'auto-mode-alist '("\\.r\\'" . rebol-mode))
(autoload 'rebol-mode "rebol-mode" "Turn on REBOL mode" t)
(add-hook 'rebol-mode-hook 'turn-on-font-lock)
the 'add-hook form tells emacs what functions to add to which
mode. In these cases, you see it used for each mode to add
'turn-on-font-lock.
Try C-h, f "turn-on-font-lock"
I hope this gets you started.
cheers
tim
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com