This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-17
Channels
- # announcements (1)
- # asami (3)
- # babashka (10)
- # beginners (61)
- # calva (60)
- # clojure (47)
- # clojure-nl (3)
- # clojure-uk (10)
- # clojurescript (36)
- # conjure (18)
- # cursive (4)
- # datomic (25)
- # fulcro (21)
- # luminus (1)
- # malli (25)
- # off-topic (26)
- # pathom (2)
- # portal (55)
- # re-frame (1)
- # reagent (7)
- # sci (1)
- # shadow-cljs (25)
- # sim-testing (2)
- # sql (14)
- # vim (6)
- # xtdb (10)
Is there a way to get fold data? I'm trying to figure out how folds effect the line numbers of the buffer. I've found some work arounds that do a lot to get this information (saving state, unfolding everything, check if foldables sections line by line, then returning to prev state), but it seems like there should just be a function that I can call similar to winsaveview that will say something like "lines 3-5 are folded". Does this exist? (searching help and google hasn't turned up anything.)
function! Folds() abort
let folds = []
let i = 1
while i <= line('$')
let foldends = foldclosedend(i)
if foldends != -1
call insert(folds, [i, foldends])
let i = foldends
endif
let i = i+1
endwhile
return folds
endfunction
@U076FM90B Thanks, I think this is just what I was looking for!