Skip to main content
Module

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

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

Set the ANSI color palette used by terminal {buf}. {colors} must be a List of 16 valid color names or hexadecimal color codes, like those accepted by highlight-guifg. Also see term_getansicolors() and g:terminal_ansi_colors.

The colors normally are: 0 black 1 dark red 2 dark green 3 brown 4 dark blue 5 dark magenta 6 dark cyan 7 light grey 8 dark grey 9 red 10 green 11 yellow 12 blue 13 magenta 14 cyan 15 white

These colors are used in the GUI and in the terminal when 'termguicolors' is set. When not using GUI colors (GUI mode or 'termguicolors'), the terminal window always uses the 16 ANSI colors of the underlying terminal.

Can also be used as a method:

GetBufnr()->term_setansicolors(colors)

only available with GUI enabled and/or the +termguicolors feature

Parameters

denops: Denops
buf: unknown
colors: unknown

Returns

Promise<void>