Changes between Version 14 and Version 15 of CodingGuidelines/VIM


Ignore:
Timestamp:
Aug 7, 2014, 11:21:32 AM (10 years ago)
Author:
pulkomandy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodingGuidelines/VIM

    v14 v15  
    22I'd like to know if you made improvements on it.
    33
    4 {{{
    5 
    6 
    7 :fu FuncHaikuCheck()
    8         call matchadd('Search', '\%>80v.\+', -1) " line over 80 char
    9         call matchadd('Search', '^\s* \s*', -1)  " spaces instead of tabs
    10         call matchadd('Search', '\(for\|if\|select\|while\)(', -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)
    14                 "operator without space around it (without false positive on
    15                 "templated<type>)
    16         call matchadd('Search', '^[^#].*[^<]\zs\w*/\w', -1)
    17                 "operator without space around it (without false positive on
    18                 "#include <dir/file.h>)
    19         call matchadd('Search', '^[^/]\{2}.*\zs[^*][=/+\-< ]$', -1)
    20                 "operator at end of line (without false positives on /* and */, nor
    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
    26         call matchadd('Search', '\s$', -1) "Spaces at end of line
    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
    30 :endfu
    31 }}}
     4http://cgit.haiku-os.org/haiku/plain/3rdparty/pulkomandy/checkstyle.vim
    325
    336== Calling the function ==