Tuesday, January 13, 2015

On writing a Vim syntax file — and coding in Swift with Vim

In the August 2014 issue of PragPub, there is an article written by yours truly (that is, myself) about writing a Vim syntax file. Syntax files, as the article explains, are what give you the cool highlighting you get in Vim for just about any language under the sun (and for quite a few under other sizable stars, as well). The language we use for an example is Swift, which Apple had just introduced a couple of months before this issue came out.

So anyway: You should get that issue. (Seriously. In spite of my contribution, it’s a good one.)

You can get a hold of the syntax file we write, too, as mentioned toward the end of the article. It’s a Swift syntax file, though, and it is not comprehensive by any stretch of the imagination, since it’s just an example for the article. For the Swift-using Vimmists in the audience (I applaud you), I recommend that you look at what toyamarinyon has at GitHub:


It’s a work of VimL genius and (if you’ve read the article) great for learning more.

No comments:

Post a Comment