Howto:Syntax highlighting for Nasal: Difference between revisions

Jump to navigation Jump to search
m
→‎Vim: Update link
m (→‎Notepad++: Updated link to repo (moved from Gitorious to GitHub))
m (→‎Vim: Update link)
Line 76: Line 76:
[[File:Vim-nasal-syntax-highlighting.png|400px|thumb|Screen shot illustrating syntax highlighting in Vim]]
[[File:Vim-nasal-syntax-highlighting.png|400px|thumb|Screen shot illustrating syntax highlighting in Vim]]


One such editor is the free vim or its gui variant gvim.  
One such editor is the free vim or its GUI variant gvim.  


It's not for everyone but it's free, and testing it doesn't hurt: http://www.vim.org/.  
It's not for everyone but it's free, and testing it doesn't hurt: http://www.vim.org/.  


The syntax definition file comes with the FlightGear code (http://gitorious.org/fg/flightgear/blobs/next/scripts/syntax/nasal.vim). Highlighting works even for Nasal embedded in XML files (type ":set ft=nasal", where ft stands for file-type)
The syntax definition file comes with the FlightGear code ({{flightgear file|scripts/syntax/nasal.vim}}). Highlighting works even for Nasal embedded in XML files (type ":set ft=nasal", where ft stands for file-type)


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

Navigation menu