| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | " Vim syntax file | 
					
						
							| 
									
										
										
										
											2021-11-21 21:13:36 +00:00
										 |  |  | " Language:		indent(1) configuration file | 
					
						
							|  |  |  | " Maintainer:		Doug Kearns <dougkearns@gmail.com> | 
					
						
							|  |  |  | " Previous Maintainer:	Nikolai Weibull <now@bitwi.se> | 
					
						
							| 
									
										
										
										
											2024-09-29 11:18:42 +02:00
										 |  |  | " Last Change:		2024 Sep 29 | 
					
						
							| 
									
										
										
										
											2017-03-05 17:04:09 +01:00
										 |  |  | "   indent_is_bsd:      If exists, will change somewhat to match BSD implementation | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  | " | 
					
						
							| 
									
										
										
										
											2017-03-05 17:04:09 +01:00
										 |  |  | " TODO:     is the deny-all (a la lilo.vim nice or no?)... | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  | "       irritating to be wrong to the last char... | 
					
						
							|  |  |  | "       would be sweet if right until one char fails | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  | if exists("b:current_syntax") | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  |   finish | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  | let s:cpo_save = &cpo | 
					
						
							|  |  |  | set cpo&vim | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-06-24 21:56:24 +00:00
										 |  |  | setlocal iskeyword+=-,+ | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | syn match   indentError   '\S\+' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | syn keyword indentTodo    contained TODO FIXME XXX NOTE | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-07-04 22:49:24 +00:00
										 |  |  | syn region  indentComment start='/\*' end='\*/' | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  |                           \ contains=indentTodo,@Spell | 
					
						
							| 
									
										
										
										
											2005-07-04 22:49:24 +00:00
										 |  |  | syn region  indentComment start='//' skip='\\$' end='$' | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  |                           \ contains=indentTodo,@Spell | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-05-10 18:19:11 +00:00
										 |  |  | if !exists("indent_is_bsd") | 
					
						
							| 
									
										
										
										
											2021-11-21 21:13:36 +00:00
										 |  |  |   syn match indentOptions '-i\|--indent-level\|-il\|--indent-label' | 
					
						
							| 
									
										
										
										
											2007-05-12 14:23:41 +00:00
										 |  |  |                         \ nextgroup=indentNumber skipwhite skipempty | 
					
						
							| 
									
										
										
										
											2007-05-10 18:19:11 +00:00
										 |  |  | endif | 
					
						
							| 
									
										
										
										
											2007-05-12 14:23:41 +00:00
										 |  |  | syn match   indentOptions '-\%(bli\|c\%([bl]i\|[dip]\)\=\|di\=\|ip\=\|lc\=\|pp\=i\|sbi\|ts\|-\%(brace-indent\|comment-indentation\|case-brace-indentation\|declaration-comment-column\|continuation-indentation\|case-indentation\|else-endif-column\|line-comments-indentation\|declaration-indentation\|indent-level\|parameter-indentation\|line-length\|comment-line-length\|paren-indentation\|preprocessor-indentation\|struct-brace-indentation\|tab-size\)\)' | 
					
						
							|  |  |  |                         \ nextgroup=indentNumber skipwhite skipempty | 
					
						
							| 
									
										
										
										
											2007-05-10 18:19:11 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-29 11:18:42 +02:00
										 |  |  | syn match   indentNumber  display contained '-\=\d\+\>' | 
					
						
							| 
									
										
										
										
											2007-05-10 18:19:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | syn match   indentOptions '-T' | 
					
						
							| 
									
										
										
										
											2007-05-12 14:23:41 +00:00
										 |  |  |                         \ nextgroup=indentIdent skipwhite skipempty | 
					
						
							| 
									
										
										
										
											2007-05-10 18:19:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | syn match   indentIdent   display contained '\h\w*\>' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  | syn keyword indentOptions -bacc --blank-lines-after-ifdefs | 
					
						
							|  |  |  |                         \ -bad --blank-lines-after-declarations | 
					
						
							|  |  |  |                         \ -badp --blank-lines-after-procedure-declarations | 
					
						
							|  |  |  |                         \ -bap --blank-lines-after-procedures | 
					
						
							|  |  |  |                         \ -bbb --blank-lines-before-block-comments | 
					
						
							|  |  |  |                         \ -bbo --break-before-boolean-operator | 
					
						
							|  |  |  |                         \ -bc --blank-lines-after-commas | 
					
						
							|  |  |  |                         \ -bfda --break-function-decl-args | 
					
						
							|  |  |  |                         \ -bfde --break-function-decl-args-end | 
					
						
							|  |  |  |                         \ -bl --braces-after-if-line | 
					
						
							|  |  |  |                         \ -blf --braces-after-func-def-line | 
					
						
							|  |  |  |                         \ -bls --braces-after-struct-decl-line | 
					
						
							|  |  |  |                         \ -br --braces-on-if-line | 
					
						
							|  |  |  |                         \ -brf --braces-on-func-def-line | 
					
						
							|  |  |  |                         \ -brs --braces-on-struct-decl-line | 
					
						
							| 
									
										
										
										
											2007-05-10 18:19:11 +00:00
										 |  |  |                         \ -bs --Bill-Shannon --blank-before-sizeof | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  |                         \ -c++ --c-plus-plus | 
					
						
							|  |  |  |                         \ -cdb --comment-delimiters-on-blank-lines | 
					
						
							|  |  |  |                         \ -cdw --cuddle-do-while | 
					
						
							|  |  |  |                         \ -ce --cuddle-else | 
					
						
							|  |  |  |                         \ -cs --space-after-cast | 
					
						
							|  |  |  |                         \ -dj --left-justify-declarations | 
					
						
							|  |  |  |                         \ -eei --extra-expression-indentation | 
					
						
							|  |  |  |                         \ -fc1 --format-first-column-comments | 
					
						
							|  |  |  |                         \ -fca --format-all-comments | 
					
						
							|  |  |  |                         \ -gnu --gnu-style | 
					
						
							| 
									
										
										
										
											2007-05-10 18:19:11 +00:00
										 |  |  |                         \ -h --help --usage | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  |                         \ -hnl --honour-newlines | 
					
						
							| 
									
										
										
										
											2007-05-10 18:19:11 +00:00
										 |  |  |                         \ -kr --k-and-r-style --kernighan-and-ritchie --kernighan-and-ritchie-style | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  |                         \ -lp --continue-at-parentheses | 
					
						
							|  |  |  |                         \ -lps --leave-preprocessor-space | 
					
						
							|  |  |  |                         \ -nbacc --no-blank-lines-after-ifdefs | 
					
						
							|  |  |  |                         \ -nbad --no-blank-lines-after-declarations | 
					
						
							|  |  |  |                         \ -nbadp --no-blank-lines-after-procedure-declarations | 
					
						
							|  |  |  |                         \ -nbap --no-blank-lines-after-procedures | 
					
						
							|  |  |  |                         \ -nbbb --no-blank-lines-before-block-comments | 
					
						
							|  |  |  |                         \ -nbbo --break-after-boolean-operator | 
					
						
							|  |  |  |                         \ -nbc --no-blank-lines-after-commas | 
					
						
							|  |  |  |                         \ -nbfda --dont-break-function-decl-args | 
					
						
							|  |  |  |                         \ -nbfde --dont-break-function-decl-args-end | 
					
						
							| 
									
										
										
										
											2007-05-10 18:19:11 +00:00
										 |  |  |                         \ -nbs --no-Bill-Shannon --no-blank-before-sizeof | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  |                         \ -ncdb --no-comment-delimiters-on-blank-lines | 
					
						
							|  |  |  |                         \ -ncdw --dont-cuddle-do-while | 
					
						
							|  |  |  |                         \ -nce --dont-cuddle-else | 
					
						
							|  |  |  |                         \ -ncs --no-space-after-casts | 
					
						
							|  |  |  |                         \ -ndj --dont-left-justify-declarations | 
					
						
							|  |  |  |                         \ -neei --no-extra-expression-indentation | 
					
						
							|  |  |  |                         \ -nfc1 --dont-format-first-column-comments | 
					
						
							|  |  |  |                         \ -nfca --dont-format-comments | 
					
						
							|  |  |  |                         \ -nhnl --ignore-newlines | 
					
						
							| 
									
										
										
										
											2007-05-10 18:19:11 +00:00
										 |  |  |                         \ -nip --dont-indent-parameters --no-parameter-indentation | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  |                         \ -nlp --dont-line-up-parentheses | 
					
						
							|  |  |  |                         \ -nlps --remove-preprocessor-space | 
					
						
							|  |  |  |                         \ -npcs --no-space-after-function-call-names | 
					
						
							| 
									
										
										
										
											2007-05-10 18:19:11 +00:00
										 |  |  |                         \ -npmt | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  |                         \ -npro --ignore-profile | 
					
						
							|  |  |  |                         \ -nprs --no-space-after-parentheses | 
					
						
							|  |  |  |                         \ -npsl --dont-break-procedure-type | 
					
						
							|  |  |  |                         \ -nsaf --no-space-after-for | 
					
						
							|  |  |  |                         \ -nsai --no-space-after-if | 
					
						
							|  |  |  |                         \ -nsaw --no-space-after-while | 
					
						
							|  |  |  |                         \ -nsc --dont-star-comments | 
					
						
							|  |  |  |                         \ -nsob --leave-optional-blank-lines | 
					
						
							|  |  |  |                         \ -nss --dont-space-special-semicolon | 
					
						
							|  |  |  |                         \ -nut --no-tabs | 
					
						
							|  |  |  |                         \ -nv --no-verbosity | 
					
						
							|  |  |  |                         \ -o --output | 
					
						
							|  |  |  |                         \ -o --output-file | 
					
						
							| 
									
										
										
										
											2007-05-10 18:19:11 +00:00
										 |  |  |                         \ -orig --berkeley --berkeley-style --original --original-style | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  |                         \ -pcs --space-after-procedure-calls | 
					
						
							|  |  |  |                         \ -pmt --preserve-mtime | 
					
						
							|  |  |  |                         \ -prs --space-after-parentheses | 
					
						
							|  |  |  |                         \ -psl --procnames-start-lines | 
					
						
							|  |  |  |                         \ -saf --space-after-for | 
					
						
							|  |  |  |                         \ -sai --space-after-if | 
					
						
							|  |  |  |                         \ -saw --space-after-while | 
					
						
							|  |  |  |                         \ -sc --start-left-side-of-comments | 
					
						
							|  |  |  |                         \ -sob --swallow-optional-blank-lines | 
					
						
							|  |  |  |                         \ -ss --space-special-semicolon | 
					
						
							|  |  |  |                         \ -st --standard-output | 
					
						
							|  |  |  |                         \ -ut --use-tabs | 
					
						
							|  |  |  |                         \ -v --verbose | 
					
						
							|  |  |  |                         \ -version --version | 
					
						
							| 
									
										
										
										
											2010-02-11 14:19:15 +01:00
										 |  |  |                         \ -linux --linux-style | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if exists("indent_is_bsd") | 
					
						
							| 
									
										
										
										
											2007-05-12 14:23:41 +00:00
										 |  |  |   syn keyword indentOptions -ip -ei -nei | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | endif | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if exists("c_minlines") | 
					
						
							|  |  |  |   let b:c_minlines = c_minlines | 
					
						
							|  |  |  | else | 
					
						
							|  |  |  |   if !exists("c_no_if0") | 
					
						
							|  |  |  |     let b:c_minlines = 50       " #if 0 constructs can be long | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  |   else | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  |     let b:c_minlines = 15       " mostly for () constructs | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  |   endif | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  | hi def link indentError   Error | 
					
						
							|  |  |  | hi def link indentComment Comment | 
					
						
							|  |  |  | hi def link indentTodo    Todo | 
					
						
							|  |  |  | hi def link indentOptions Keyword | 
					
						
							|  |  |  | hi def link indentNumber  Number | 
					
						
							|  |  |  | hi def link indentIdent   Identifier | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | let b:current_syntax = "indent" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-06-29 22:40:58 +00:00
										 |  |  | let &cpo = s:cpo_save | 
					
						
							|  |  |  | unlet s:cpo_save |