Vim Tips Wiki
We recommend that you log in before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your Watchlist. Creating an account is quick and free.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 65: Line 65:
 
let cf = foldlevel(cl)
 
let cf = foldlevel(cl)
 
let uf = foldlevel(cl - 1)
 
let uf = foldlevel(cl - 1)
βˆ’
let min = (cf > uf ? uf : cf)
+
let max = (cf > uf ? uf : cf)
βˆ’
if min
+
if max
βˆ’
execute "normal!" min . "zo"
+
execute "normal!" max . "zo"
 
return 1
 
return 1
 
endif
 
endif
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)