Changes between Version 3 and Version 4 of CodingGuidelines/VIM


Ignore:
Timestamp:
Aug 12, 2009 12:22:42 PM (10 years ago)
Author:
pulkomandy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodingGuidelines/VIM

    v3 v4  
    88
    99:fu FuncHaikuCheck()
    10        call matchadd('ErrorMsg', '\%>80v.\+', -1) " More than 80 chars on a line
    11        call matchadd('ErrorMsg', '  ', -1) " Two spaces (likely wrong indentation)
    12        call matchadd('ErrorMsg', 'for(', -1) "for without space
    13        call matchadd('ErrorMsg', 'if(', -1) " if without space
    14        call matchadd('ErrorMsg', 'select(', -1)
    15        call matchadd('ErrorMsg', 'while(', -1)
    16        call matchadd('Search', '[a-z-A-Z0-9][,=/+\-*;][a-zA-Z0-9]', -1) " operator with no space around it
    17        call matchadd('Search', '[,=/+\-* ]$', -1) " operator or whitespace at end of line
    18 
     10        call matchadd('Search', '\%>80v.\+', -1) " line with more than 80 chars
     11        call matchadd('Search', '  ', -1)        " probably wrong indenting
     12        call matchadd('Search', '\(for\|if\|select\|while\)(', -1) "keyword without space after it
     13        call matchadd('Search', '[a-zA-Z0-9][,=<>/+\-*;][a-zA-Z0-9]', -1) "operator without space around it
     14        call matchadd('Search', '[^*/][,=/+\-* ]$', -1) "operator at end of line (without false positives on /* and */)
    1915:endfu
    2016