Suppose I have these Vim definitions:
syn match tasktag "\(\s\)\@<=@[a-zA-Z0-9_]\+" syn match taskdone "\<[Dd]one\>" containedin=tasktag
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
First, your "tasktag" match does not allow spaces or other "word delimiters", yet your "taskdone" match requires "done" to be a discrete word because of your \< and \> word boundary atoms.
Second, your "taskdone" match is written to only highlight the word "Done".
Assuming I properly understand what you want, I modified your two matches:
syn match tasktag "\(\s\)\@<=@[a-zA-Z0-9_ ]\+" syn match taskdone "@.*\<[Dd]one\>.*" containedin=tasktag
If you haven't done so already, you will need to specify the highlighting for the two matches. For example:
highlight link tasktag TODO highlight link taskdone Statement