Lines Matching refs:line
46 " Find line above 'lnum' that isn't empty, or in a string.
50 " If the line isn't empty or in a string, end search.
51 let line = getline(lnum)
52 if !(s:IsInString(lnum, 1) && s:IsInString(lnum, strlen(line)))
60 " Check if line 'lnum' has more opening brackets than closing ones.
65 let line = getline(a:lnum)
66 let pos = match(line, '[][(){}]', 0)
68 let idx = stridx('(){}[]', line[pos])
74 let pos = match(line, '[][(){}]', pos + 1)
98 " 3.2. Work on the current line {{{2
102 " Get the current line.
103 let line = getline(v:lnum)
106 " TODO iterate through all the matches in a line
107 let col = matchend(line, '\/\*')
114 let col = matchend(line, '\*\/')
120 if line =~ '^\s*//'
124 " If we got a closing bracket on an empty line, find its match and indent
126 let col = matchend(line, '^\s*[]}]')
130 let bs = strpart('{}[]', stridx('}]', line[col - 1]) * 2, 2)
145 " If we are in a multi-line string, don't do anything to it.
146 if s:IsInString(v:lnum, matchend(line, '^\s*') + 1)
150 " 3.3. Work on the previous line. {{{2
159 " Set up variables for current line.
160 let line = getline(lnum)
163 " If the previous line ended with a block opening, add a level of indent.
168 " If the previous line contained an opening bracket, and we are still in it,
170 if line =~ '[[({]'