Created
October 16, 2012 09:02
-
-
Save Altreus/3898177 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set statusline=all\ the\ stuff\ %{FindSub()}\ and\ more\ stuff | |
function! FindSub() | |
let subpattern = '\(sub\|function\) \w\+' | |
let subline = search(subpattern, 'bnW') | |
if !subline | |
return 'not in sub' | |
else | |
return matchstr(getline(subline), subpattern) | |
endif | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment