Skip to main content
Module

x/denops_std/option/mod.ts>syntax

📚 Standard module for denops.vim
Go to Latest
variable syntax
import { syntax } from "https://deno.land/x/denops_std@v4.1.0/option/mod.ts";

{not available when compiled without the |+syntax| feature} When this option is set, the syntax with this name is loaded, unless syntax highlighting has been switched off with ":syntax off". Otherwise this option does not always reflect the current syntax (the b:current_syntax variable does). This option is most useful in a modeline, for a file which syntax is not automatically recognized. Example, in an IDL file: // ~ When a dot appears in the value then this separates two filetype names. Example: // ~ This will use the "c" syntax first, then the "doxygen" syntax. Note that the second one must be prepared to be loaded as an addition, otherwise it will be skipped. More than one dot may appear. To switch off syntax highlighting for the current file, use: > :set syntax=OFF < To switch syntax highlighting on according to the current value of the 'filetype' option: > :set syntax=ON < What actually happens when setting the 'syntax' option is that the Syntax autocommand event is triggered with the value as argument. This option is not copied to another buffer, independent of the 's' or 'S' flag in 'cpoptions'. Only normal file name characters can be used, "/*?[|<>" are illegal.

type

{ get(denops: Denops): Promise<string>; set(denops: Denops, value: string): Promise<void>; reset(denops: Denops): Promise<void>; getLocal(denops: Denops): Promise<string>; setLocal(denops: Denops, value: string): Promise<void>; resetLocal(denops: Denops): Promise<void>; }