Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/mod.ts>did_filetype

๐Ÿ“š Standard module for denops.vim
Go to Latest
function did_filetype
import { did_filetype } from "https://deno.land/x/denops_std@v5.0.2/function/mod.ts";

Returns TRUE when autocommands are being executed and the FileType event has been triggered at least once. Can be used to avoid triggering the FileType event again in the scripts that detect the file type. FileType Returns FALSE when :setf FALLBACK was used. When editing another file, the counter is reset, thus this really checks if the FileType event has been triggered for the current buffer. This allows an autocommand that starts editing another buffer to set 'filetype' and load a syntax file.

Returns

Promise<number>