I am trying to customize the syntax highlighting for python in vim. I want to highlight the keyword self but only when it is followed by a .. Here is the code I came up with:
syn match pythonBoolean "\(\Wself\)\%(\.\)"
Unfortunately, the . is also highlighted though I use a non capturing group \%(\.\).
Any idea?