I am writing some bending functions, and I am at the point where I need to check if the current line is really a bend.
The reason for this is because it is a custom fold method that depends on finding / matching specific strings.
For example, if the current line adds up and looks like this:
-FOO------------------------
If you do something like:
getline('.')
You basically get FOO , so I donβt know (I know that I know) if I am in focus or not.
Is there a helper function for this?
I would think that it should be something like:
is_folded('.')
Perhaps I could associate with foldtext to assign a special header for the fold, but I want to avoid this.
function vim folding
alfredodeza
source share