Board index FlightGear Development Nasal

Nasal on Mac ..Any good Editor  Topic is solved

Nasal is the scripting language of FlightGear.

Nasal on Mac ..Any good Editor  

Postby Pat70 » Sat Jun 18, 2011 12:06 pm

Hi,

Much of it is in the topic name but lets give you some more details :)
i am using a Mac, Mac Os X (10.6) and just started to be interested by Nasal. Thus i would like to develop some very simple stuff to start and learn. I already go thru the Wiki (great, ) the french version of it (Tuxfamilly..nice) and all the docs and stuff about Nasal in the FG folder.
I started with really basic things :oops: using TextEdit but :
1) textedit didnt allowed me to save any file as .nas ! ok, i took one from FG, copy, delete the content and use it (not a really nice way to do i think)
2) TextEdit seems not able to handle copy and past in nasal !! i dunno why but doing copy and past generate Parse error !

So, is there any good (if possible free) software on Mac to type nasal more easyly and in a more friendly way than Textedit ?
if not (then setprop"sorry for you Pat", 1 :mrgreen: ) is there any tips i should be aware of concerning Nasal and Textedit on Mac ?

Many thanks for your help and advices.
PS i find some app for windows but nothing for Mac using classical helps and Google.
Pat
Pat (Pat 70 on the forum...) sometimes as Pat2 on the Laptop
Member of the FG Rotor Flying Club http://fgrc.tk/
Pat70
 
Posts: 273
Joined: Sun Nov 21, 2010 11:13 am
Location: Fr
Callsign: Pat
Version: 2
OS: MAcOSX 10.5

Re: Nasal on Mac ..Any good Editor

Postby zakalawe » Sat Jun 18, 2011 6:50 pm

I use TextMate - it doesn't have anything specific for Nasal, but it's a great code / XML editor, with lots of features that make working with any scripting language easier.
zakalawe
 
Posts: 1259
Joined: Sat Jul 19, 2008 5:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: Nasal on Mac ..Any good Editor

Postby Pat70 » Wed Jun 22, 2011 7:11 am

Hi,

Thnaks a lot for your help and advices Zakalawe.
I finally choose a free software for Mac that seems pretty good for XML coding and seems to deal correctly with Nasal SMULTRON.
Many thanks.
Cheers
Pat
Topic marked as solved i think now :)
Pat (Pat 70 on the forum...) sometimes as Pat2 on the Laptop
Member of the FG Rotor Flying Club http://fgrc.tk/
Pat70
 
Posts: 273
Joined: Sun Nov 21, 2010 11:13 am
Location: Fr
Callsign: Pat
Version: 2
OS: MAcOSX 10.5

Re: Nasal on Mac ..Any good Editor

Postby mfranz » Wed Jun 22, 2011 10:32 am

There's Nasal syntax-highlighting support available for some editors, which is a big advantage, as it makes Nasal coding much easier. It can often point to syntax errors and so reduce the number of tedious time-consuming and unproductive FlightGear runs. It also makes understanding other people's code easier. 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/. 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)

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 me to spot tab crimes.)

Image
User avatar
mfranz
 
Posts: 160
Joined: Thu Nov 30, 2006 5:35 pm
Location: Austria

Re: Nasal on Mac ..Any good Editor

Postby Pat70 » Fri Jun 24, 2011 7:36 am

Hi MFranz,

Thx a lot for your answer. i think i will give a try to that one too, especially considering that i am making lot of parse error when typing my nasal. Well many errors probably because these are my first nasal and thus too basic then too long....but it works so i am rather satisfied, i still have a lot lot to learn but its coming slowly to my old brain. I just figure out how powerful it was !
many thanks
thanks Melcjior (also for your wonderful work on Helis :) )
Pat
Pat (Pat 70 on the forum...) sometimes as Pat2 on the Laptop
Member of the FG Rotor Flying Club http://fgrc.tk/
Pat70
 
Posts: 273
Joined: Sun Nov 21, 2010 11:13 am
Location: Fr
Callsign: Pat
Version: 2
OS: MAcOSX 10.5

Re: Nasal on Mac ..Any good Editor

Postby tk_jkg » Wed Feb 29, 2012 12:36 pm

I use Textwrangler for mac and its free!

http://www.barebones.com/products/textwrangler/
tk_jkg
 
Posts: 73
Joined: Sun Feb 19, 2012 2:48 pm
Location: Sweden
Callsign: SE-ToM
Version: 2.12.1
OS: Mac OS X

Re: Nasal on Mac ..Any good Editor

Postby Hooray » Wed Feb 29, 2012 1:14 pm

Hi & welcome,

you might want to add your editor (and maybe a screen shot) to the wiki: http://wiki.flightgear.org/Howto:_Synta ... _for_Nasal
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Nasal on Mac ..Any good Editor

Postby omega95 » Mon Mar 05, 2012 4:35 pm

Pat70 wrote in Sat Jun 18, 2011 12:06 pm:if not (then setprop"sorry for you Pat", 1 :mrgreen: )


This is a pointless post but the syntax is

Code: Select all
setprop(property, 1)
:wink:
Merlion Virtual Airlines - the experience of a flight time...
Get high quality aircraft, airports, video tutorials or development tools from my hangar.
omega95
 
Posts: 1222
Joined: Sat Jul 30, 2011 1:59 am
Location: -unknown-
Callsign: MIA0001, OM-EGA
IRC name: omega95
Version: 2.12 git
OS: Ubuntu 13.04


Return to Nasal

Who is online

Users browsing this forum: No registered users and 2 guests