Changes between Version 13 and Version 14 of CodingGuidelines/VIM
- Timestamp:
- Jul 8, 2010, 1:07:05 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CodingGuidelines/VIM
v13 v14 6 6 7 7 :fu FuncHaikuCheck() 8 call matchadd('Search', '\%>80v.\+', -1) " line with more than 80 chars9 call matchadd('Search', ' 0\s* \s*', -1) " probably wrong indenting8 call matchadd('Search', '\%>80v.\+', -1) " line over 80 char 9 call matchadd('Search', '^\s* \s*', -1) " spaces instead of tabs 10 10 call matchadd('Search', '\(for\|if\|select\|while\)(', -1) 11 "keyword without space after it 12 call matchadd('Search', '[a-zA-Z0-9][,=>+\-*;][a-zA-Z0-9]', -1) 11 "missing space after control statement 12 call matchadd('Search', '//\S', -1) " Missing space at comment start 13 call matchadd('Search', '\w[,=>+\-*;]\w', -1) 13 14 "operator without space around it (without false positive on 14 15 "templated<type>) 15 call matchadd('Search', '^[^#].*[^<] [a-zA-Z0-9]*/[a-zA-Z0-9]', -1)16 call matchadd('Search', '^[^#].*[^<]\zs\w*/\w', -1) 16 17 "operator without space around it (without false positive on 17 18 "#include <dir/file.h>) 18 call matchadd('Search', '^[^/]\{2}.* [^*][=/+\-]$', -1)19 call matchadd('Search', '^[^/]\{2}.*\zs[^*][=/+\-< ]$', -1) 19 20 "operator at end of line (without false positives on /* and */, nor 20 21 "char*\nClass::method()) 22 call matchadd('Search', '^[^#].*\zs[^<]>$', -1) 23 " > operator at end of line (without false positive on #include <file.h>) 24 call matchadd('Search', '){', -1) " Missing space after method header 25 call matchadd('Search', '}\n\s*else', -1) " Malformed else 21 26 call matchadd('Search', '\s$', -1) "Spaces at end of line 22 27 call matchadd('Search', ',\S', -1) " Missing space after comma 28 call matchadd('Search', '^}\n\{1,2}\S', -1) " Less than 2 lines between functions 29 call matchadd('Search', '^}\n\{4,}\S', -1) " More than 2 lines between functions 23 30 :endfu 24 31 }}}