Skip to content

Commit

Permalink
Merge pull request #64 from juanpabloaj/addFold
Browse files Browse the repository at this point in the history
doc: modificated second example
  • Loading branch information
MarcWeber committed Dec 22, 2011
2 parents 1302bb1 + e361252 commit b9e2804
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions doc/snipMate.txt
Expand Up @@ -125,9 +125,17 @@ Example 2: ~
Add to your ~/.vimrc: For each know snippet add a second version ending in _
adding folding markers
>
fun! AddFolding(text)
return "# {{{1\n".a:text."\n# }}}"
endf
let g:commentChar = {
\ 'vim': '"',
\ 'c': '//',
\ 'cpp': '//',
\ 'sh': '#',
\ 'python': '#'
\}
" url https://github.com/garbas/vim-snipmate/issues/49
fun! AddFolding(text)
return substitute(a:text,'\n'," ".g:commentChar[&ft]." {{{\n",1)."\n".g:commentChar[&ft]." }}}"
endf
fun! SnippetsWithFolding(scopes, trigger, result)
" hacky: temporarely remove this function to prevent infinite recursion:
Expand Down

0 comments on commit b9e2804

Please sign in to comment.