Syntax highlighting for Scheme in vim and emacs

From Notes_Wiki
Revision as of 13:32, 7 April 2022 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > Scheme > Syntax highlighting for Scheme in vim and emacs

It's been observed that both vim and emacs do not, by default, recognize files with the .rkt extension as scheme source code. Remedy it with the following steps :

vim

Add the following lines to your .vimrc

" Recognize .rkt files as scheme source
if version >= 600
	au BufNewFile,BufRead *.rkt set filetype=scheme
endif


emacs

Add the following lines to your .emacs file:

;; enter scheme-mode while editing .rkt files
(setq auto-mode-alist
      (cons '("\\.rkt$" . scheme-mode)
            auto-mode-alist))



Home > Scheme > Syntax highlighting for Scheme in vim and emacs