shell文本编辑器如何工作?

综合技术 2019-01-12 阅读原文

我在编程方面相当新,但我想知道如何使用vim,emacs,nano等shell文本编辑器来控制命令行窗口.我主要是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.

翻译自:https://stackoverflow.com/questions/179299/how-do-shell-text-editors-work

责编内容by:代码日志 【阅读原文】。感谢您的支持!