Skip to main content
Module

x/ddc_vim/deps.ts>fn.fnameescape

Dark deno-powered completion framework for neovim/Vim8
Go to Latest
function fn.fnameescape
import { fn } from "https://deno.land/x/ddc_vim@v2.3.0/deps.ts";
const { fnameescape } = fn;

Escape {string} for use as file name command argument. All characters that have a special meaning, such as '%' and '|' are escaped with a backslash. For most systems the characters escaped are " \t\n*?[{`$\%#'"|!<". For systems where a backslash appears in a filename, it depends on the value of 'isfname'. A leading '+' and '>' is also escaped (special after |:edit| and |:write|). And a "-" by itself (special after |:cd|). Example: :let fname = '+some str%nge|name' :exe "edit " . fnameescape(fname) results in executing: edit +some\ str%nge|name Can also be used as a |method|: GetName()->fnameescape()

Parameters

denops: Denops
string: unknown

Returns

Promise<unknown>