Chapter 5Highlighting Syntax
Syntax highlighting is part of Vim’s filetype support for the wide variety of languages that it supports by default. It relies on syntax files, VimL script files that define the elements of languages and place them in standard categories so that Vim knows how to format and highlight code in those languages. When we come up with our own filetype, it’s up to us to tell Vim how to highlight that filetype’s syntax.
Our plugin project is getting close to where we’ll put on the finishing touches. In this chapter we’ll clean up the playlist track listing and create our own special syntax. Then we’ll prettify it with syntax highlighting. We’ll use the filetype we worked on in the previous chapter and see another facet ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access