You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
815 B

  1. set textwidth=95
  2. set cinoptions=(0:0
  3. " C99 keywords
  4. syn keyword cType uint64_t uint32_t uint16_t uint8_t bool
  5. syn keyword cType int64_t int32_t int16_t int8_t
  6. " Linux keywords
  7. syn keyword cType __u64 __u32 __u16 __u8
  8. syn keyword cType u64 u32 u16 u8
  9. syn keyword cOperator likely unlikely
  10. " make invisible errors, very visible
  11. "
  12. " no trailing whitespacing, no spaces at the begging of the line.
  13. " and no tabs after spaces.
  14. syn match WrongWhitespace /\s\+$\|^ \+\| \+\t/
  15. " no more than 7 spaces for aligning
  16. "
  17. " NOTE: aligning after `int ab(` would break this rule, as 6 or 7
  18. " spaces would be needed without a previous tab. but two letters
  19. " as a function name, please don't.
  20. syn match WrongWhitespace /\t \{8,}/
  21. "match WrongWhitespace / \+\ze\t/ " what is this?
  22. highlight WrongWhitespace ctermbg=red guibg=red