views:

259

answers:

4

I just discovered the Falcon programming language today and would like to experiment with it a bit. As it is quite new, there is no ide. That's not a problem as I can use Vim. It would be helpful if there were a Vim syntax file for Falcon, but I can't seem to find one. Can someone point me to a Vim syntax file for Falcon? If not, I could really use a thorough tutorial to creating my own syntax files for Vim. I'm on Windows, and a very basic Vim user, so something step-by-step which is specific to that OS would be greatly appreciated. Thanks!

+1  A: 

Check the Vim documentation, it has an entire section about syntax highlighting files and how to write your own custom syntax files.

CMS
+3  A: 

There doesn't seem to be one, as far as I can see (and google). You could try writing one, but be warned, it's not that simple as it may sound. Sure, it's not that much of a problem if you only want to highlight syntax keywords, but going into regexing something (and only that something) can get a bit difficult.

I'm not familiar with that language, but try finding a syntax file from a language which is relatively similar to it, at least by "structure", and start by modifying it.

For regex references, apart from vim's help I'd reccomend "beggining regular expressions" and "regular expression pocket ref." (it has a nice comparison feature, which includes vim's regex as well).

ldigas
Good advice - start with something Vim already has (e.g. C/Python) and modify it for the vagaries of Falcon.
paxdiablo
Yes, as far as I've seen from wikipedia/../Falcon (just glanced) Python's syntax file would be ok, as a start. Try to find a list of reserved keywords somewhere for falcon.
ldigas
Thank you both. I'll take a look at copying and adjusting the Python file.
ssakl
+3  A: 

Check out:

svn://falconpl.org/falcon/docs/trunk/SyntaxHilight

It's a bit outdated, but should be workable.

Thank you. This saved me a lot of work.
ssakl
A: 

Steve Oliver wrote a VIM syntax file for Falcon. It's located here: http://www.vim.org/scripts/script.php?script%5Fid=2745