Lines Matching refs:lnum
22 setlocal indentexpr=GetJSONIndent(v:lnum)
43 " Check if the character at lnum:col is inside a string.
44 function s:IsInString(lnum, col) argument
45 return synIDattr(synID(a:lnum, a:col, 1), 'name') == 'jsonString'
48 " Find line above 'lnum' that isn't empty, or in a string.
49 function s:PrevNonBlankNonString(lnum) argument
50 let lnum = prevnonblank(a:lnum)
51 while lnum > 0
53 let line = getline(lnum)
54 if !(s:IsInString(lnum, 1) && s:IsInString(lnum, strlen(line)))
57 let lnum = prevnonblank(lnum - 1)
59 return lnum
62 " Check if line 'lnum' has more opening brackets than closing ones.
63 function s:LineHasOpeningBrackets(lnum) argument
67 let line = getline(a:lnum)
81 function s:Match(lnum, regex) argument
82 let col = match(getline(a:lnum), a:regex) + 1
83 return col > 0 && !s:IsInString(a:lnum, col) ? col : 0
92 " For the current line, use the first argument if given, else v:lnum
93 let clnum = a:0 ? a:1 : v:lnum
134 let lnum = prevnonblank(clnum - 1)
136 if lnum == 0
141 let line = getline(lnum)
142 let ind = indent(lnum)
145 " if s:Match(lnum, s:block_regex)
146 " return indent(lnum) + shiftwidth()
152 let counts = s:LineHasOpeningBrackets(lnum)