News for hackers. Stuff that matters.
Re:Swift syntax for Vim by tendom on Friday June 13, 2014 @08:14PM (#7891515)
It would be great to post an image of what this looks like in a couple code examples. I've been working on this as well, primarily because I haven't seen a syntax that gets it right, usually it's rushed or sloppy, and some just really get the syntax wrong. with off false positives appearing all over.
Re:Swift syntax for Vim by leorocky on Friday June 13, 2014 @08:25PM (#7891571)
I think the problem is also vim which doesn't have a really great way to do syntax highlighting. At least not an easy way. Highlighting is all in a single thread and blocks which makes it slow on large files and the regular expressions seem fragile. I think a better way to do syntax highlighting would involve a lexer and bison instead of regular expression hell.
Re:Swift syntax for Vim by SmileyKeith on Friday June 13, 2014 @09:27PM (#7891747)
Surprisingly this file is pretty simple. The learning curve for writing syntax files is definitely something though.
Re:Swift syntax for Vim by SmileyKeith on Friday June 13, 2014 @09:26PM (#7891746)
Thanks for the feedback, I'll add some screenshots.
Re:Swift syntax for Vim by SmileyKeith on Friday June 13, 2014 @09:59PM (#7891835)
Done!
Re:Swift syntax for Vim by tendom on Saturday June 14, 2014 @07:59AM (#7892625)
Looks good.