Skip to main content
Module

x/denops_std/function/vim/mod.ts>swapfilelist

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

Returns a list of swap file names, like what "vim -r" shows. See the -r command argument. The 'directory' option is used for the directories to inspect. If you only want to get a list of swap files in the current directory then temporarily set 'directory' to a dot:

let save_dir = &directory
let &directory = '.'
let swapfiles = swapfilelist()
let &directory = save_dir

Returns

Promise<unknown[]>