Permalink
Browse files

add foldexpr for gist list buffer

  • Loading branch information...
1 parent 2380106 commit 1e78c97c1aa6e2650fbfade72878c75bc393934d @c9s c9s committed Nov 26, 2009
Showing with 4 additions and 1 deletion.
  1. +4 −1 gist.vim
View
@@ -217,7 +217,10 @@ function! s:GistList(user, token, gistls)
setlocal nomodified
syntax match SpecialKey /^gist:/he=e-1
exec 'nnoremap <silent> <buffer> <cr> :call <SID>GistListAction()<cr>'
- normal! gg
+
+ cal cursor(1,1)
+ setlocal foldmethod=expr
+ setlocal foldexpr=getline(v:lnum)=~'^gist:'?'>1':'='
endfunction
function! s:GistGetFileName(gistid)

0 comments on commit 1e78c97

Please sign in to comment.