@@ -2423,6 +2423,7 @@ term_dumpload({filename} [, {options}])
24232423term_dumpwrite({buf} , {filename} [, {options} ])
24242424 none dump terminal window contents
24252425term_getaltscreen({buf} ) Number get the alternate screen flag
2426+ term_getansicolors({buf} ) List get ANSI palette in GUI color mode
24262427term_getattr({attr} , {what} ) Number get the value of attribute {what}
24272428term_getcursor({buf} ) List get the cursor position of a terminal
24282429term_getjob({buf} ) Job get the job associated with a terminal
@@ -2435,6 +2436,8 @@ term_gettty({buf}, [{input}]) String get the tty name of a terminal
24352436term_list() List get the list of terminal buffers
24362437term_scrape({buf} , {row} ) List get row of a terminal screen
24372438term_sendkeys({buf} , {keys} ) none send keystrokes to a terminal
2439+ term_setansicolors({buf} , {colors} )
2440+ none set ANSI palette in GUI color mode
24382441term_setkill({buf} , {how} ) none set signal to stop job in terminal
24392442term_setrestore({buf} , {command} ) none set command to restore terminal
24402443term_start({cmd} , {options} ) Job open a terminal window and run a job
@@ -8248,6 +8251,18 @@ term_getaltscreen({buf}) *term_getaltscreen()*
82488251 {buf} is used as with | term_getsize() | .
82498252 {only available when compiled with the | +terminal | feature}
82508253
8254+ term_getansicolors({buf} ) *term_getansicolors()*
8255+ Get the ANSI color palette in use by terminal {buf} .
8256+ Returns a List of length 16 where each element is a String
8257+ representing a color in hexadecimal "#rrggbb" format.
8258+ Also see | term_setansicolors() | and | g:terminal_ansi_colors | .
8259+ If neither was used returns the default colors.
8260+
8261+ {buf} is used as with | term_getsize() | . If the buffer does not
8262+ exist or is not a terminal window, an empty list is returned.
8263+ {only available when compiled with the | +terminal | feature and
8264+ with GUI enabled and/or the | +termguicolors | feature}
8265+
82518266term_getattr({attr} , {what} ) *term_getattr()*
82528267 Given {attr} , a value returned by term_scrape() in the "attr"
82538268 item, return whether {what} is on. {what} can be one of:
@@ -8379,6 +8394,19 @@ term_sendkeys({buf}, {keys}) *term_sendkeys()*
83798394 means the character CTRL-X .
83808395 {only available when compiled with the | +terminal | feature}
83818396
8397+ term_setansicolors({buf} , {colors} ) *term_setansicolors()*
8398+ Set the ANSI color palette used by terminal {buf} .
8399+ {colors} must be a List of 16 valid color names or hexadecimal
8400+ color codes, like those accepted by | highlight-guifg | .
8401+ Also see | term_getansicolors() | and | g:terminal_ansi_colors | .
8402+
8403+ These colors are used in the GUI and in the terminal when
8404+ 'termguicolors' is set. When not using GUI colors (GUI mode
8405+ or | termguicolors | ), the terminal window always uses the 16
8406+ ANSI colors of the underlying terminal.
8407+ {only available when compiled with the | +terminal | feature and
8408+ with GUI enabled and/or the | +termguicolors | feature}
8409+
83828410term_setkill({buf} , {how} ) *term_setkill()*
83838411 When exiting Vim or trying to close the terminal window in
83848412 another way, {how} defines whether the job in the terminal can
@@ -8463,6 +8491,9 @@ term_start({cmd}, {options}) *term_start()*
84638491 CTRL-D is used on MS-Windows. For Python
84648492 use CTRL-Z or "exit()". For a shell use
84658493 "exit". A CR is always added.
8494+ "ansi_colors" A list of 16 color names or hex codes
8495+ defining the ANSI palette used in GUI
8496+ color modes. See | g:terminal_ansi_colors | .
84668497
84678498 {only available when compiled with the | +terminal | feature}
84688499
0 commit comments