Difference between revisions of "Syntax highlighting for Scheme in vim and emacs"

From Notes_Wiki
(Created page with "=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...")
 
m
Line 1: Line 1:
<yambe:breadcrumb self="Syntax highlighting for Scheme in vim and emacs">Scheme|Scheme</yambe:breadcrumb>
=Syntax highlighting for Scheme in vim and emacs=
=Syntax highlighting for Scheme in vim and emacs=


Line 23: Line 24:
             auto-mode-alist))
             auto-mode-alist))
</pre>
</pre>
<yambe:breadcrumb self="Syntax highlighting for Scheme in vim and emacs">Scheme|Scheme</yambe:breadcrumb>

Revision as of 05:46, 18 September 2018

<yambe:breadcrumb self="Syntax highlighting for Scheme in vim and emacs">Scheme|Scheme</yambe:breadcrumb>

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))


<yambe:breadcrumb self="Syntax highlighting for Scheme in vim and emacs">Scheme|Scheme</yambe:breadcrumb>