Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
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.3.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[]>