Skip to content
Snippets Groups Projects
Commit 9955b8ab authored by Jerome Reybert's avatar Jerome Reybert
Browse files

plugin/magit.vim: <cr> toggle vim folding (ref #71)

parent 702cff8c
No related branches found
No related tags found
No related merge requests found
...@@ -475,6 +475,12 @@ endfunction ...@@ -475,6 +475,12 @@ endfunction
function! magit#open_close_folding_wrapper(mapping, ...) function! magit#open_close_folding_wrapper(mapping, ...)
if ( getline(".") =~ g:magit_file_re ) if ( getline(".") =~ g:magit_file_re )
return call('magit#open_close_folding', a:000) return call('magit#open_close_folding', a:000)
elseif ( foldlevel(line(".")) == 2 )
if ( foldclosed(line('.')) == -1 )
foldclose
else
foldopen
endif
else else
silent! execute "silent! normal! " . a:mapping silent! execute "silent! normal! " . a:mapping
endif endif
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment