Created
August 18, 2010 20:11
-
-
Save tsibley/536022 to your computer and use it in GitHub Desktop.
Fold BPS copyright boilerplate in RT
This file contains 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
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