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

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中快速上下移动以及在行首和行尾快速跳转的快捷键。
技术分享

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。