Skip to content

Instantly share code, notes, and snippets.

@tsibley
Created August 18, 2010 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsibley/536022 to your computer and use it in GitHub Desktop.
Save tsibley/536022 to your computer and use it in GitHub Desktop.
Fold BPS copyright boilerplate in RT
func! s:FoldBPSCopyright()
if !exists( "b:foldedBPSCopyright" ) && (&ft == 'mason' || &ft == 'perl')
let b:foldedBPSCopyright = 1
set foldenable
try
" The idea is to only have the copyright block folded
silent /BEGIN BPS TAGGED BLOCK/,/END BPS TAGGED BLOCK/fold
catch
" do nothing
endtry
endif
endfunc
" Fold BPS copyright boilerplate
au BufRead * call s:FoldBPSCopyright()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment