我对编程相当陌生,但我想知道 shell 文本编辑器(如 vim、emacs、nano 等)如何能够控制命令行窗口。我主要是一名 Windows 程序员,所以也许 *nix 上的情况有所不同。据我所知,只能将文本打印到控制台并要求输入。文本编辑器如何在命令行环境中创建可导航、可编辑的窗口?
通过使用如下库,这些库又使用转义字符序列
NAME
ncurses - CRT screen handling and optimization package
SYNOPSIS
#include
DESCRIPTION
The ncurses library routines give the user a terminal-independent
method of updating character screens with reasonable optimization. This
implementation is ‘‘new curses’’ (ncurses) and is the approved replacement
for 4.4BSD classic curses, which has been discontinued.
[...snip....]
The ncurses package supports: overall screen, window and pad
manipulation; output to windows and pads; reading terminal input; control
over terminal and curses input and output options; environment query
routines; color manipulation; use of soft label keys; terminfo capabilities;
and access to low-level terminal-manipulation routines.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)