377
edits
m (→Emacs: https://forum.flightgear.org/viewtopic.php?f=30&t=41115&p=409029#p409029) |
(→Emacs: Consolidate instructions) |
||
Line 22: | Line 22: | ||
[[File:Emacs-nasal-syntax-highlighting.png|400px|thumb|Nasal syntax highlighting in GNU Emacs]] | [[File:Emacs-nasal-syntax-highlighting.png|400px|thumb|Nasal syntax highlighting in GNU Emacs]] | ||
There is | There is an Emacs major mode for Nasal available in SimGear, that is based on Andy Ross' [https://github.com/andyross/nasal/blob/master/misc/nasal-mode.el original version]. In order to use it, you can copy the {{simgear source | ||
| path = simgear/nasal/misc/nasal-mode.el | |||
| text = nasal-mode.el | |||
}} file where you have the rest of your manually installed packages and add the following line to your [https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html Emacs initialization file]: | |||
<nowiki>(require 'nasal-mode)</nowiki> | <nowiki>(require 'nasal-mode)</nowiki> | ||
In case you don't already have a directory to place your manually installed packages, put the file for instance in ''~/.emacs.d/manual-installs/'' (first create this directory if necessary) and insert the following in your Emacs initialization file before the above ''require'' line: | |||
<nowiki>;; Tell | <nowiki>;; Tell Emacs it can load ELisp files from there | ||
(add-to-list 'load-path "~/.emacs.d/ | (add-to-list 'load-path "~/.emacs.d/manual-installs")</nowiki> | ||
Once this is done, restart Emacs, check that no error is reported and open a .nas file. | |||
Optional step: in order to speed up loading of nasal-mode.el, you can open it and choose ''Byte-compile this file'' from the ''Emacs-Lisp'' menu (or equivalently, run M-x byte-compile-file). | |||
{{Tip|In case you have a clone of the {{simgear source | |||
| text = SimGear repository | |||
}} on your hard drive, you may create a symbolic link from ~/.emacs.d/manual-installs/nasal-mode.el to the file inside that repository; this way, you'll get automatic updates of nasal-mode.el when your SimGear repository is updated (Emacs will ignore the .elc file resulting from byte compilation if the corresponding .el file is more recent).}} | |||
The '''true''' and '''false''' keywords introduced in | The '''true''' and '''false''' keywords introduced in January 2023 are already supported.<ref>https://forum.flightgear.org/viewtopic.php?f=30&t=41115&p=409029#p409029</ref> | ||
== Geany == | == Geany == |
edits