Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function! HTMLCurrentDivId()
- let m = searchpos('<\s*div.\{-}id\s*=\s*"\([^"]*\)"', 'bnWp')
- if m[2] == 2
- return matchlist(getline(m[0]), 'id\s*=\s*"\([^"]*\)"')[1]
- else
- return ''
- endif
- endfunction
- set statusline=\%{HTMLCurrentDivId()}
Advertisement
Add Comment
Please, Sign In to add comment