Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddu_vim/deps.ts>fn.foldtext

Dark deno-powered UI framework for neovim/Vim8
Go to Latest
function fn.foldtext
import { fn } from "https://deno.land/x/ddu_vim@v1.13.0/deps.ts";
const { foldtext } = fn;

Returns a String, to be displayed for a closed fold. This is the default function used for the 'foldtext' option and should only be called from evaluating 'foldtext'. It uses the |v:foldstart|, |v:foldend| and |v:folddashes| variables. The returned string looks like this: +-- 45 lines: abcdef The number of leading dashes depends on the foldlevel. The "45" is the number of lines in the fold. "abcdef" is the text in the first non-blank line of the fold. Leading white space, "//" or "/*" and the text from the 'foldmarker' and 'commentstring' options is removed. When used to draw the actual foldtext, the rest of the line will be filled with the fold char from the 'fillchars' setting. {not available when compiled without the |+folding| feature}

Returns

Promise<unknown>