Chinaunix首页 | 论坛 | 博客
  • 博客访问: 749713
  • 博文数量: 176
  • 博客积分: 2548
  • 博客等级: 少校
  • 技术积分: 1749
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-29 16:36
个人简介

爱咋咋地

文章分类

全部博文(176)

文章存档

2024年(1)

2023年(17)

2022年(19)

2021年(3)

2020年(1)

2018年(1)

2017年(1)

2014年(1)

2013年(4)

2012年(11)

2011年(19)

2010年(22)

2009年(71)

2008年(5)

分类: LINUX

2012-03-13 11:07:17

天天在shell下玩,从没注意过这个特性:vi退出后屏幕上保留的是进入vi之前的内容,认为是理所应当的。这段时间玩下“gnu screen”(请大家注意和终端的screen概念相区别)发现,vi退出后屏幕上显示的还是vi里面的内容。

网上搜索后,发现gnu screen的配置中有一项#altscreen on,把#去掉就可以实现原来的功能了。

原来这个feature是各个终端自己实现的。
google 发现如下内容供参考

Xterm automatically highlights the text cursor when the pointer enters the window (selected) and unhighlights it when the pointer leaves the window (unselected). If the window is the focus window, then the text cursor is highlighted no matter where the pointer is.

In VT102 mode, there are escape sequences to activate and deactivate an alternate screen buffer, which is the same size as the display area of the window. When activated, the current screen is saved and replaced with the alternate screen. Saving of lines scrolled off the top of the window is disabled until the normal screen is restored. The (5) entry for xterm allows the visual editor (1) to switch to the alternate screen for editing and to restore the screen on exit. A popup menu entry makes it simple to switch between the normal and alternate screens for cut and paste.

In either VT102 or Tektronix mode, there are escape sequences to change the name of the windows. Additionally, in VT102 mode, xterm implements the window-manipulation control sequences from dtterm, such as resizing the window, setting its location on the screen.

Xterm allows character-based applications to receive mouse events (currently button-press and release events, and button-motion events) as keyboard control sequences. SeeXterm Control Sequences for details.

阅读(1928) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~