Lines Matching +full:1 +full:a

23     let stack = synstack(a:lnum, 1)
47 if getline(a:lnum - 1) =~ '\\$'
48 if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$'
49 return indent(a:lnum - 1)
51 …return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwid…
54 " If the start of the line is in a string don't change the indent.
56 \ && synIDattr(synID(a:lnum, 1, 1), "name") =~ "String$"
57 return -1
61 let plnum = prevnonblank(v:lnum - 1)
68 call cursor(plnum, 1)
74 if disable_parentheses_indenting == 1
89 \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
93 " We may have found the opening brace of a BitBake Python task, e.g. 'python do_task {'
110 " i = (a
113 call cursor(a:lnum, 1)
115 \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
116 \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
121 " Handle first non-empty line inside a BB Python task
126 " Handle the user actually trying to close a BitBake Python task
127 let line = getline(a:lnum)
138 \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
139 \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
157 " Get the line and remove a trailing comment.
162 " If the last character in the line is a comment, do a binary search for
163 " the start of the comment. synID() is slow, a linear search would take
164 " too long on a long line.
165 if synIDattr(synID(plnum, pline_len, 1), "name") =~ "\\(Comment\\|Todo\\)$"
166 let min = 1
170 if synIDattr(synID(plnum, col, 1), "name") =~ "\\(Comment\\|Todo\\)$"
173 let min = col + 1
176 let pline = strpart(pline, 0, min - 1)
185 let col = col + 1
189 " If the previous line ended with a colon, indent this line
194 " If the previous line was a stop-execution statement...
195 " TODO: utilize this logic to deindent when ending a bbPyDefRegion
198 if indent(a:lnum) > indent(plnum) - shiftwidth()
203 return -1
206 " If the current line begins with a keyword that lines up with "try"
207 if getline(a:lnum) =~ '^\s*\(except\|finally\)\>'
208 let lnum = a:lnum - 1
209 while lnum >= 1
212 if ind >= indent(a:lnum)
213 return -1 " indent is already less than this
217 let lnum = lnum - 1
219 return -1 " no matching "try"!
222 " If the current line begins with a header keyword, dedent
223 if getline(a:lnum) =~ '^\s*\(elif\|else\)\>'
225 " Unless the previous line was a one-liner
231 if indent(a:lnum) <= plindent - shiftwidth()
232 return -1
238 " When after a () construct we probably want to go back to the start line.
239 " a = (b
246 return -1
256 let b:did_indent = 1
262 return -1
265 let stack = synstack(a:lnum, 1)
267 return -1
283 " Instead of trying to handle crazy cases like that, just assume that a
284 " double-quote on a line by itself (following an assignment) means the
286 if getline(a:lnum) =~ '^\s*"$'
290 let prevstack = synstack(a:lnum - 1, 1)
292 return -1
297 " Only indent if there was actually a continuation character on
299 let prevlinelastchar = synIDattr(synID(a:lnum - 1, col([a:lnum - 1, "$"]) - 1, 1), "name")
303 if index(["bbVarDef", "bbVarFlagDef"], prevname) != -1
314 return -1
317 if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1
318 let ret = GetBBPythonIndent(a:lnum)
320 " return of -1 (defer to autoindent) or -2 (force indent to 0)
330 " Need to submit a patch upstream to Vim to provide an extension point.
338 " + heuristics for de-denting out of a bbPyDefRegion? e.g. when the user
340 " writing a shell task. Maybe too hard to implement...
342 return -1