Howto:Syntax highlighting for Nasal: Difference between revisions

m
changed emacs to fit alphabetical order
(Added Emacs)
m (changed emacs to fit alphabetical order)
Line 18: Line 18:
# Click on packages and search for nasal
# Click on packages and search for nasal
# Click install for Language Nasal
# Click install for Language Nasal
== Emacs ==
[[File:Emacs-nasal-syntax-highlighting.png|400px|thumb|Nasal syntax highlighting in GNU Emacs]]
There is a Emacs major mode for Nasal available here: https://github.com/andyross/nasal/blob/master/misc/nasal-mode.el
Under Linux just drop the file where you have the rest of your manually installed packages and add the following to your .emacs file:
<nowiki>(require 'nasal-mode)</nowiki>
If you don't have a directory to place your manually installed packages, put the file in the directory ''~/.emacs.d/lisp/'' (create it if it doesn't exist) and then put the following in your .emacs file before the ''require'':
<nowiki>;; Tell emacs where is your personal elisp lib dir
(add-to-list 'load-path "~/.emacs.d/lisp/")</nowiki>
Reload .emacs via <code>'''M-x''' load-file</code> or by restarting Emacs.


== gedit ==
== gedit ==
Line 91: Line 105:
Here's an example, which demonstrates a short code segment with three syntax errors as well as the highlighting of a matching pair of parentheses (yellow) and trailing spaces (blue x). (The leading blue dots aren't on by default. They help to spot tab crimes.)
Here's an example, which demonstrates a short code segment with three syntax errors as well as the highlighting of a matching pair of parentheses (yellow) and trailing spaces (blue x). (The leading blue dots aren't on by default. They help to spot tab crimes.)
{{-}}
{{-}}
== Emacs ==
[[File:Emacs-nasal-syntax-highlighting.png|400px|thumb|Nasal syntax highlighting in GNU Emacs]]
There is a Emacs major mode for Nasal available here: https://github.com/andyross/nasal/blob/master/misc/nasal-mode.el
Under Linux just drop the file where you have the rest of your manually installed packages and add the following to your .emacs file:
<nowiki>(require 'nasal-mode)</nowiki>
If you don't have a directory to place your manually installed packages, put the file in the directory ''~/.emacs.d/lisp/'' (create it if it doesn't exist) and then put the following in your .emacs file before the ''require'':
<nowiki>;; Tell emacs where is your personal elisp lib dir
(add-to-list 'load-path "~/.emacs.d/lisp/")</nowiki>
Reload .emacs via <code>'''M-x''' load-file</code> or by restarting Emacs.


== Other editors ==
== Other editors ==
343

edits