Skip to content

Commit 64b39c1

Browse files
committed
Added folding to the passed specs
1 parent 9644572 commit 64b39c1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

plugin/vim-rspec.vim

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"
22
" Vim Rspec
3-
" Last change: March 4 2009
4-
" Version> 0.0.4
3+
" Last change: March 5 2009
4+
" Version> 0.0.5
55
" Maintainer: Eustáquio 'TaQ' Rangel
66
" License: GPL
77
" URL: git://github.com/taq/vim-rspec
@@ -114,10 +114,13 @@ function! s:RunSpecMain(type)
114114

115115
" put the result on a new buffer
116116
silent exec "new"
117-
set buftype=nofile
117+
setl buftype=nofile
118118
silent exec "r! ".s:cmd
119-
set syntax=vim-rspec
119+
setl syntax=vim-rspec
120120
silent exec "nnoremap <buffer> <cr> :call <SID>TryToOpen()<cr>"
121+
setl foldmethod=expr
122+
setl foldexpr=getline(v:lnum)=~'^\+'
123+
setl foldtext=\"+--\ \".string(v:foldend-v:foldstart+1).\"\ passed\ \"
121124
call cursor(1,1)
122125
endfunction
123126

0 commit comments

Comments
 (0)