Skip to content

Instantly share code, notes, and snippets.

@Osse
Created October 24, 2012 17:44
Show Gist options
  • Save Osse/3947612 to your computer and use it in GitHub Desktop.
Save Osse/3947612 to your computer and use it in GitHub Desktop.
Hacky hack for Python
" If the line is empty, search backwards and return the indent of the
" previous line that got an explicit number from GetPythonIndent()
if getline(a:lnum) == ''
let x = a:lnum - 1
while x > 0 && GetPythonIndent(x) == -1
let x = x - 1
endwhile
return x + 1
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment