1" Vim syntax file 2" Language: indent(1) configuration file 3" Maintainer: Nikolai Weibull <[email protected]> 4" Latest Revision: 2005-06-29 5" indent_is_bsd: If exists, will change somewhat to match BSD implementation 6" 7" TODO: is the deny-all (a la lilo.vim nice or no?)... 8" irritating to be wrong to the last char... 9" would be sweet if right until one char fails 10 11if exists("b:current_syntax") 12 finish 13endif 14 15let s:cpo_save = &cpo 16set cpo&vim 17 18setlocal iskeyword=@,48-57,-,_ 19 20syn match indentError '\S\+' 21 22syn keyword indentTodo contained TODO FIXME XXX NOTE 23 24syn region indentComment matchgroup=indentComment 25 \ start='/\*' end='\*/' 26 \ contains=indentTodo,@Spell 27syn region indentComment matchgroup=indentComment 28 \ start='//' skip='\\$' end='$' 29 \ contains=indentTodo,@Spell 30 31syn keyword indentOptions -bacc --blank-lines-after-ifdefs 32 \ -bad --blank-lines-after-declarations 33 \ -badp --blank-lines-after-procedure-declarations 34 \ -bap --blank-lines-after-procedures 35 \ -bbb --blank-lines-before-block-comments 36 \ -bbo --break-before-boolean-operator 37 \ -bc --blank-lines-after-commas 38 \ -bfda --break-function-decl-args 39 \ -bfde --break-function-decl-args-end 40 \ -bl --braces-after-if-line 41 \ -blf --braces-after-func-def-line 42 \ -bls --braces-after-struct-decl-line 43 \ -br --braces-on-if-line 44 \ -brf --braces-on-func-def-line 45 \ -brs --braces-on-struct-decl-line 46 \ -bs --Bill-Shannon 47 \ -bs --blank-before-sizeof 48 \ -c++ --c-plus-plus 49 \ -cdb --comment-delimiters-on-blank-lines 50 \ -cdw --cuddle-do-while 51 \ -ce --cuddle-else 52 \ -cs --space-after-cast 53 \ -dj --left-justify-declarations 54 \ -eei --extra-expression-indentation 55 \ -fc1 --format-first-column-comments 56 \ -fca --format-all-comments 57 \ -gnu --gnu-style 58 \ -h --help 59 \ -h --usage 60 \ -hnl --honour-newlines 61 \ -kr --k-and-r-style 62 \ -kr --kernighan-and-ritchie 63 \ -kr --kernighan-and-ritchie-style 64 \ -lp --continue-at-parentheses 65 \ -lps --leave-preprocessor-space 66 \ -nbacc --no-blank-lines-after-ifdefs 67 \ -nbad --no-blank-lines-after-declarations 68 \ -nbadp --no-blank-lines-after-procedure-declarations 69 \ -nbap --no-blank-lines-after-procedures 70 \ -nbbb --no-blank-lines-before-block-comments 71 \ -nbbo --break-after-boolean-operator 72 \ -nbc --no-blank-lines-after-commas 73 \ -nbfda --dont-break-function-decl-args 74 \ -nbfde --dont-break-function-decl-args-end 75 \ -nbs --no-Bill-Shannon 76 \ -nbs --no-blank-before-sizeof 77 \ -ncdb --no-comment-delimiters-on-blank-lines 78 \ -ncdw --dont-cuddle-do-while 79 \ -nce --dont-cuddle-else 80 \ -ncs --no-space-after-casts 81 \ -ndj --dont-left-justify-declarations 82 \ -neei --no-extra-expression-indentation 83 \ -nfc1 --dont-format-first-column-comments 84 \ -nfca --dont-format-comments 85 \ -nhnl --ignore-newlines 86 \ -nip --dont-indent-parameters 87 \ -nip --no-parameter-indentation 88 \ -nlp --dont-line-up-parentheses 89 \ -nlps --remove-preprocessor-space 90 \ -npcs --no-space-after-function-call-names 91 \ -npro --ignore-profile 92 \ -nprs --no-space-after-parentheses 93 \ -npsl --dont-break-procedure-type 94 \ -nsaf --no-space-after-for 95 \ -nsai --no-space-after-if 96 \ -nsaw --no-space-after-while 97 \ -nsc --dont-star-comments 98 \ -nsob --leave-optional-blank-lines 99 \ -nss --dont-space-special-semicolon 100 \ -nut --no-tabs 101 \ -nv --no-verbosity 102 \ -o --output 103 \ -o --output-file 104 \ -orig --berkeley 105 \ -orig --berkeley-style 106 \ -orig --original 107 \ -orig --original-style 108 \ -pcs --space-after-procedure-calls 109 \ -pmt --preserve-mtime 110 \ -prs --space-after-parentheses 111 \ -psl --procnames-start-lines 112 \ -saf --space-after-for 113 \ -sai --space-after-if 114 \ -saw --space-after-while 115 \ -sc --start-left-side-of-comments 116 \ -sob --swallow-optional-blank-lines 117 \ -ss --space-special-semicolon 118 \ -st --standard-output 119 \ -ut --use-tabs 120 \ -v --verbose 121 \ -version --version 122 123syn keyword indentOptions -bli --brace-indent 124 \ -c --comment-indentation 125 \ -bli --brace-indent 126 \ -c --comment-indentation 127 \ -cbi --case-brace-indentation 128 \ -cd --declaration-comment-column 129 \ -ci --continuation-indentation 130 \ -cli --case-indentation 131 \ -cp --else-endif-column 132 \ -d --line-comments-indentation 133 \ -di --declaration-indentation 134 \ -i --indent-level 135 \ -ip --parameter-indentation 136 \ -l --line-length 137 \ -lc --comment-line-length 138 \ -pi --paren-indentation 139 \ -ppi --preprocessor-indentation 140 \ -sbi --struct-brace-indentation 141 \ -ts --tab-size 142 \ nextgroup=indenNumber skipwhite 143if !exists("indent_is_bsd") 144 syn keyword indentOptions -i --indentation-level 145 \ nextgroup=indentNumber skipwhite 146endif 147 148syn match indentNumber display '\<\d\+\>' 149 150syn keyword indentOptions -T nextgroup=indentIdent skipwhite 151 152syn match indentIdent display '\<\h\w*\>' 153 154if exists("indent_is_bsd") 155 syn keyword indentOptions -ip -nip -dj -ndj -ei -nei 156endif 157 158if exists("c_minlines") 159 let b:c_minlines = c_minlines 160else 161 if !exists("c_no_if0") 162 let b:c_minlines = 50 " #if 0 constructs can be long 163 else 164 let b:c_minlines = 15 " mostly for () constructs 165 endif 166endif 167 168hi def link indentError Error 169hi def link indentComment Comment 170hi def link indentTodo Todo 171hi def link indentOptions Keyword 172hi def link indentNumber Number 173hi def link indentIdent Identifier 174 175let b:current_syntax = "indent" 176 177let &cpo = s:cpo_save 178unlet s:cpo_save 179