April 21, 2016 • 1 min read
After a recent talk I gave that included VimScript, an attendee asked a question about the differences between
syn in a Vim syntax highlighting file.
These three short chapters from ‘Learn VimScript the Hard Way’ help explain:
Here’s the short version:
keywordassigns a variable name directly to a word or multiple words
matchassigns a variable name to a Vim regex
regionassigns a variable name to something between a “start” pattern and an “end” pattern
For more info, check out the Vim help pages for each:
:help syn-keyword :help syn-match :help syn-region
Did you enjoy this post? Follow me on Twitter for more.