Lines Matching refs:line
45 " Regex of syntax group names that are line comment.
49 let s:skip_expr = "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'"
86 " Check if the character at lnum:col is inside a multi-line comment.
91 " Check if the character at lnum:col is a line comment.
96 " Find line above 'lnum' that isn't empty, in a comment, or in a string.
102 " If the line isn't empty (with opt. comment) or in a string, end search.
103 let line = getline(lnum)
104 if line =~ '/\*'
110 elseif !in_block && line =~ '\*/'
112 …elseif !in_block && line !~ '^\s*\%(//\).*$' && !(s:IsInStringOrComment(lnum, 1) && s:IsInStringOr…
120 " Find line above 'lnum' that started the continuation 'lnum' may be part of.
122 " Start on the line we're at and use its indent.
126 " If we have a continuation line, or we're in a string, use line as MSL.
128 let line = getline(lnum)
129 let col = match(line, s:msl_regex) + 1
130 if (col > 0 && !s:IsInStringOrComment(lnum, col)) || s:IsInString(lnum, strlen(line))
133 " Don't use lines that are part of a one line scope as msl unless the
163 let line = getline(lnum)
165 " if the line is a js keyword
166 if (line =~ s:js_keywords)
167 " check if the line is a var stmt
168 " if the line has a comma first or comma last then we can assume that we
170 if (line =~ s:var_stmt)
185 " Find line above with beginning of the var statement or returns 0 if it's not
192 let line = s:RemoveTrailingComments(getline(prev_lnum))
194 " if the previous line doesn't end in a comma, return to regular indent
195 if (line !~ s:comma_last)
206 " Check if line 'lnum' has more opening brackets than closing ones.
211 let line = getline(a:lnum)
212 let pos = match(line, '[][(){}]', 0)
215 let idx = stridx('(){}[]', line[pos])
222 let pos = match(line, '[][(){}]', pos + 1)
233 " Set up variables to use and search for MSL to the previous line.
236 let line = getline(lnum)
238 " If the previous line wasn't a MSL and is continuation return its indent.
241 if s:Match(p_lnum,s:continuation_regex)||s:IsInString(p_lnum,strlen(line))
249 " If the previous line ended with [*+/.-=], start a continuation that
273 " if the current line is in a one line scope ..
296 " 3.2. Work on the current line {{{2
300 " Get the current line.
301 let line = getline(v:lnum)
302 " previous nonblank line number
305 " If we got a closing bracket on an empty line, find its match and indent
307 " others we indent to the containing line's MSL's level. Return -1 if fail.
308 let col = matchend(line, '^\s*[],})]')
317 if (line[col - 1] =~ ',')
318 " if the previous line ends in comma or semicolon don't indent
320 return indent(s:GetMSL(line('.'), 0))
321 " get previous line indent, if it's comma first return prevline indent
332 let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2)
334 if line[col-1]==')' && col('.') != col('$') - 1
337 let ind = indent(s:GetMSL(line('.'), 0))
343 " If the line is comma first, dedent 1 level
348 if (line =~ s:ternary)
356 " If we are in a multi-line comment, cindent does the right thing.
367 " 3.3. Work on the previous line. {{{2
370 " If the line is empty and the previous nonblank line was a multi-line
373 if line =~ '^\s*$' && s:IsInMultilineComment(prevline, 1)
377 " Find a non-blank, non-multi-line string line above the current line.
380 " If the line is empty and inside a string, use the previous line.
381 if line =~ '^\s*$' && lnum != prevline
390 " Set up variables for current line.
391 let line = getline(lnum)
394 " If the previous line ended with a block opening, add a level of indent.
399 " If the previous line contained an opening bracket, and we are still in it,
401 if line =~ '[[({]'
416 " 3.4. Work on the MSL line. {{{2
463 " Put all the lines on one line and do normal splitting after that