Skip to main content
Module

x/denops_std/function/mod.ts>hlID

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

The result is a Number, which is the ID of the highlight group with name {name}. When the highlight group doesn't exist, zero is returned. This can be used to retrieve information about the highlight group. For example, to get the background color of the "Comment" group:

:echo synIDattr(synIDtrans(hlID("Comment")), "bg")

Obsolete name: highlightID().

Can also be used as a method:

GetName()->hlID()

Parameters

denops: Denops
name: unknown

Returns

Promise<number>