Skip to content

Instantly share code, notes, and snippets.

@c9s
Created November 7, 2009 18:35
Show Gist options
  • Save c9s/228818 to your computer and use it in GitHub Desktop.
Save c9s/228818 to your computer and use it in GitHub Desktop.
fun! Itemfy()
let mdl = '# vim' . ':fdm=expr:'
\ . 'foldexpr=getline(v\:lnum)=~''^==''?''>1''\:getline(v\:lnum)[0]=~''[*x(]''?''>2''\:''='':
cal append( 0, [ mdl ] )
w
e! %
endf
com! Itemfy :call Itemfy()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment