While implementing xterm-256-colors in ConEmu I have discovered some unknown for me Escape sequences (used by Vim) like
Esc | 7 m
Esc | 15 m
Esc | 112 m
From Vim sources I realize that these codes are used for changing bold or inverse attributes, but I can't find any docs about them.
Are there any specifications for Esc | N m
sequences? They were not mentioned here.
ESC M. moves cursor one line up, scrolling if needed. ESC 7. save cursor position (DEC)
ESC = Set numeric keypad mode (default) ESC > Turn off all character attributes ESC [m -or- ESC [0m. Turn underline mode on.
A Terminal Control Code, AKA terminal escape sequence, AKA terminal control sequecence, is an in-band sequence of bytes that may be interpreted by a character imaging device such as a terminal.
The advantage of using ANSI escape codes is that, today, these are available on most operating systems, including Windows, and you don't need to install third party libraries. These are well suited for simple command line applications. If you need to do complex text graphics check the ncurses library.
I believe these are internal vim codes for internal processing only: first set of \033|
is labeled
/*
* GUI pseudo term-cap.
*/
and AFAIR is processed in gui.c
or gui_*.c
, second set is labeled
/*
* These codes are valid for the pc video. The entries that start with ESC |
* are translated into conio calls in os_msdos.c. Default for MSDOS.
*/
third set is labeled
/*
* These codes are valid for the Win32 Console . The entries that start with
* ESC | are translated into console calls in os_win32.c. The function keys
* are also translated in os_win32.c.
*/
(I am talking about builtin_termcaps
array). Further mentions: only in update_tcap
function, there are no direct references that these are processed by some other function, but it is unlikely that it is something else (not familiar with pseudo-termcap processing code). Except for term.c
it is only seen directly (i.e. grep finds \033|
) in screen.c
(twice) and gui.c
(once).
And, by the way, I failed to see this code in output of vim launched in logging screen session using env TERM=xterm vim {args}
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With