Changes between Version 13 and Version 14 of CodingGuidelines/VIM


Ignore:
Timestamp:
Jul 8, 2010, 1:07:05 PM (14 years ago)
Author:
pulkomandy
Comment:

Add some rules that were in the python version but not here.

Legend:

Unmodified
Added
Removed
Modified
  • CodingGuidelines/VIM

    v13 v14  
    66
    77:fu FuncHaikuCheck()
    8                 call matchadd('Search', '\%>80v.\+', -1) " line with more than 80 chars
    9         call matchadd('Search', '0\s* \s*', -1)        " probably wrong indenting
     8        call matchadd('Search', '\%>80v.\+', -1) " line over 80 char
     9        call matchadd('Search', '^\s* \s*', -1)  " spaces instead of tabs
    1010        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)
    1314                "operator without space around it (without false positive on
    1415                "templated<type>)
    15         call matchadd('Search', '^[^#].*[^<][a-zA-Z0-9]*/[a-zA-Z0-9]', -1)
     16        call matchadd('Search', '^[^#].*[^<]\zs\w*/\w', -1)
    1617                "operator without space around it (without false positive on
    1718                "#include <dir/file.h>)
    18         call matchadd('Search', '^[^/]\{2}.*[^*][=/+\- ]$', -1)
     19        call matchadd('Search', '^[^/]\{2}.*\zs[^*][=/+\-< ]$', -1)
    1920                "operator at end of line (without false positives on /* and */, nor
    2021                "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
    2126        call matchadd('Search', '\s$', -1) "Spaces at end of line
    2227        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
    2330:endfu
    2431}}}