Skip to main content
Module

x/denops_std/function/mod.ts>foldtext

📚 Standard module for denops.vim
Go to Latest
function foldtext
import { foldtext } from "https://deno.land/x/denops_std@v3.6.0/function/mod.ts";

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>