5
edits
m (Download and install instructions for Windows 10/11) |
(→Vim: setup) |
||
| Line 136: | Line 136: | ||
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.) | ||
{{-}} | {{-}} | ||
=== Vim Setup === | |||
Nasal highlighting in Vim can be set up thusly: | |||
mkdir -p ~/.vim/syntax | |||
Download <code>nasal.vim</code> such as from here: | |||
https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/scripts/syntax/nasal.vim?format=raw | |||
Or get <code>nasal.vim</code> from your flightgear/flightgear git repo: <code>scripts/syntax/nasal.vim</code>. | |||
Copy that file to here: | |||
~/.vim/syntax/nasal.vim | |||
Then create a file named <code>~/.vim/filetype.vim</code> and add this line: | |||
au BufRead,BufNewFile *.nas set filetype=nasal | |||
== Visual Studio Code == | == Visual Studio Code == | ||
edits