Skip to content

Commit de439d7

Browse files
authored
Merge pull request #41 from kaile256/master
Made &foldopen work in the motions
2 parents 406368d + 6eea87a commit de439d7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

autoload/camelcasemotion.vim

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ function! camelcasemotion#Motion(direction, count, mode)
163163
normal! h
164164
endif
165165
endif
166+
if &foldopen =~# 'hor\|all'
167+
normal! zv
168+
endif
166169
endfunction
167170

168171
function! camelcasemotion#InnerMotion(direction, count)
@@ -189,6 +192,9 @@ function! camelcasemotion#InnerMotion(direction, count)
189192
normal! v
190193
call camelcasemotion#Motion(a:direction, a:count, 'iv')
191194
endif
195+
if &foldopen =~# 'hor\|all'
196+
normal! zv
197+
endif
192198
endfunction
193199

194200

@@ -212,6 +218,9 @@ function! camelcasemotion#CreateMotionMappings(leader)
212218
\ 'map <silent> i' . a:leader . l:motion . ' ' . l:targetMapping
213219
endfor
214220
endfor
221+
if &foldopen =~# 'hor\|all'
222+
normal! zv
223+
endif
215224
endfunction
216225

217226
" vim: set sts=2 sw=2 expandtab ff=unix fdm=syntax :

0 commit comments

Comments
 (0)