您的位置:首页 > 其它

[Practical.Vim(2012.9)].Drew.Neil.Tip47 学习摘要

2015-04-21 23:23 344 查看

Distinguish Between Real Lines and Display Lines

Unlike many text editors, Vim makes a distinction between real lines and display lines. When the ‘wrap’ setting is enabled (and it’s on by default), each line of text that exceeds the width of the window will display as wrapped, ensuring that no text is truncated from view. As a result, a single line in the file may be represented by multiple lines on the display.

在Vim 中区分real linesdisplay lines。对于一个文本,如果一行文字的长度大于显示窗口的宽度,就会自动换为下一行以免被截断。这样原本的单行(real lines)就变为了多行(display lines)。

The easiest way to tell the difference between real lines and display lines is by enabling the ‘number’ setting. Lines that begin with a number correspond to the real lines, which may span one or more display lines.

在vim 的normal模式下中输入命令

:set number


就可以显示文本的行号。以行号开头的行就是real lines



Vim中分别提供了直接在real linesdisplay lines中快速上下移动以及在行首和行尾快速跳转的快捷键。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  vim real-lines