Lines Matching refs:line
91 " Find line above 'lnum' that isn't empty, in a comment, or in a string.
97 " If the line isn't empty (with opt. comment) or in a string, end search.
98 let line = getline(lnum)
99 if line =~ '^=begin'
105 elseif !in_block && line =~ '^=end'
107 elseif !in_block && line !~ '^\s*#.*$' && !(s:IsInStringOrComment(lnum, 1)
108 \ && s:IsInStringOrComment(lnum, strlen(line)))
116 " Find line above 'lnum' that started the continuation 'lnum' may be part of.
118 " Start on the line we're at and use its indent.
123 " If we have a continuation line, or we're in a string, use line as MSL.
125 let line = getline(lnum)
127 if s:Match(line, s:non_bracket_continuation_regex) &&
129 " If the current line is a non-bracket continuation and so is the
140 " If the current line is a bracket continuation or a block-starter, but
163 " If the previous line is a block-starter and the current one is
172 let col = match(line, s:continuation_regex) + 1
174 \ || s:IsInString(lnum, strlen(line))
187 " Check if line 'lnum' has more opening brackets than closing ones.
192 let line = getline(a:lnum)
193 let pos = match(line, '[][(){}]', 0)
200 if line[pos] == '('
202 elseif line[pos] == ')'
208 elseif line[pos] == '{'
210 elseif line[pos] == '}'
216 elseif line[pos] == '['
218 elseif line[pos] == ']'
227 let pos = match(line, '[][(){}]', pos + 1)
256 let line = getline(a:lnum)
257 let col = match(line, '.*\zs' . a:regex)
259 let line = strpart(line, 0, col)
260 let col = match(line, '.*' . a:regex)
269 " For the current line, use the first argument if given, else v:lnum
277 let line = getline(clnum)
280 " If we got a closing bracket on an empty line, find its match and indent
282 " others we indent to the containing line's MSL's level. Return -1 if fail.
283 let col = matchend(line, '^\s*[]})]')
286 let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2)
288 if line[col-1]==')' && col('.') != col('$') - 1
291 let ind = indent(s:GetMSL(line('.')))
303 let msl = s:GetMSL(line('.'))
304 let line = getline(line('.'))
306 if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
307 \ strpart(line, col('.') - 1, 2) !~ 'do'
310 let ind = indent(line('.'))
318 " If we are in a multi-line string or line-comment, don't do anything to it.
319 if s:IsInString(clnum, matchend(line, '^\s*') + 1)
323 " Find a non-blank, non-multi-line string line above the current line.
326 " If the line is empty and inside a string, use the previous line.
327 if line =~ '^\s*$' && lnum != prevnonblank(clnum - 1)
336 " Set up variables for the previous line.
337 let line = getline(lnum)
340 " If the previous line ended with a block opening, add a level of indent.
347 if line =~ '[[({]' || line =~ '[])}]\s*\%(#.*\)\=$'
358 let nonspace = matchend(line, '\S', opening.pos + 1) - 1
365 if s:Match(line('.'), s:falcon_indent_keywords)
375 " If the previous line ended with an "end", match that "end"s beginning's
382 let n = line('.')
405 " Set up variables to use and search for MSL to the previous line.
409 " If the previous line wasn't a MSL and is continuation return its indent.
412 if s:Match(p_lnum, s:non_bracket_continuation_regex) || s:IsInString(p_lnum,strlen(line))
418 let line = getline(lnum)
421 " If the MSL line had an indenting keyword in it, add a level of indent.
432 " If the previous line ended with [*+/.,-=], but wasn't a block ending or a