:syntax match WordsWithNumbers /\w*\d\w*/ containedin=ALL contains=@NoSpell
...but that will also prevent other highlighting from starting inside those words, which may or may not be an issue for you.
If it is an issue, you might be able to get around it by tacking on an extra contains=ALL, but it really depends on the rest of your syntax highlighting as to whether that will improve things or make it worse!
You could maybe hack something by having syntax highlighting match the words you wish to exclude and tag them with contains=@NoSpell (see :h spell-syntax), but I haven't tested this and it's probably full of side effects.
Add comment