Lines Matching refs:line
3 " Awk indent script. It can handle multi-line statements and expressions.
24 " 29-04-2002 Fixed problems in function headers and max line width
25 " Added support for two-line if's without curly braces
50 " Find previous line and get its indentation
58 " Increase indent if the previous line contains an opening brace. Search
59 " for this brace the hard way to prevent errors if the previous line is a
68 " If prev line has positive brace_balance and starts with a word (keyword
69 " or function name), align the current line on the first '(' of the prev
70 " line
76 " If this line starts with an open brace bail out now before the line
83 " If prev line seems to be part of multiline statement:
84 " 1. Prev line is first line of a multiline statement
85 " -> attempt to indent on first ' ' or '(' of prev line, just like we
87 " 2. Prev line is not first line of a multiline statement
88 " -> copy indent of prev line
107 " If the previous line doesn't need continuation on the current line we are
109 " previous statement instead of just the previous line. This is a bit
110 " complicated because the previous statement might be multi-line.
114 " 1 If the previous line contains closing braces and has negative brace
116 " take indent of that line
117 " 2 If the line before the previous needs continuation search backward
118 " until that's not the case anymore. Take indent of one line down.
141 " Decrease indent if this line contains a '}'.
149 " Find the open and close braces in this line and return how many more open-
153 function! s:Get_brace_balance( line, b_open, b_close ) argument
154 let line2 = substitute( a:line, a:b_open, "", "g" )
155 let openb = strlen( a:line ) - strlen( line2 )
161 " Find out whether the line starts with a word (i.e. keyword or function
164 function! s:Starts_with_word( line ) argument
165 if a:line =~ '^\s*[a-zA-Z_0-9]\+\s*('
171 " Find the length of the first word in a line. This is used to be able to
172 " align a line relative to the 'print ' or 'if (' on the previous line in case
176 function! s:First_word_len( line ) argument
177 let white_end = matchend( a:line, '^\s*' )
178 if match( a:line, '^\s*func' ) != -1
179 let word_end = matchend( a:line, '[a-z]\+\s\+[a-zA-Z_0-9]\+[ (]*' )
181 let word_end = matchend( a:line, '[a-zA-Z_0-9]\+[ (]*' )
186 " Determine if 'line' completes a statement or is continued on the next line.
190 function! s:Seems_continuing( line ) argument
192 if a:line =~ '\(--\|++\)\s*$'
195 if a:line =~ '[\\,\|\&\+\-\*\%\^]\s*$'
199 if a:line =~ '^\s*\(if\|while\|for\)\s*(.*)\s*$' || a:line =~ '^\s*else\s*'
205 " Get previous relevant line. Search back until a line is that is no
206 " comment or blank and return the line number
218 " This function checks whether an indented line exceeds a maximum linewidth