Home Explore Blog CI



neovim

10th chunk of `runtime/doc/intro.txt`
935a531370ff29499f882936a14db592a0e810a98a9ed6920000000100000fa2
 contains '$', and the change is within one line,
  the text is not directly deleted, but a '$' is put at the last deleted
  character.
- When inserting text in one window, other windows on the same text are not
  updated until the insert is finished.

Lines longer than the window width will wrap, unless the 'wrap' option is off
(see below).  The 'linebreak' option can be set to wrap at a blank character.

If the window has room after the last line of the buffer, Vim will show '~' in
the first column of the last lines in the window, like this:
>
        +-----------------------+
        |some line              |
        |last line              |
        |~                      |
        |~                      |
        +-----------------------+
<
Thus the '~' lines indicate that the end of the buffer was reached.

If the last line in a window doesn't fit, Vim will indicate this with a '@' in
the first column of the last lines in the window, like this:
>
        +-----------------------+
        |first line             |
        |second line            |
        |@                      |
        |@                      |
        +-----------------------+
<
Thus the '@' lines indicate that there is a line that doesn't fit in the
window.

When the "lastline" flag is present in the 'display' option, you will not see
'@' characters at the left side of window.  If the last line doesn't fit
completely, only the part that fits is shown, and the last three characters of
the last line are replaced with "@@@", like this:
>
        +-----------------------+
        |first line             |
        |second line            |
        |a very long line that d|
        |oesn't fit in the wi@@@|
        +-----------------------+
<
If there is a single line that is too long to fit in the window, this is a
special situation.  Vim will show only part of the line, around where the
cursor is.  There are no special characters shown, so that you can edit all
parts of this line.

The |hl-NonText| highlight group can be used to set special highlighting
for the '@' and '~' characters.  This makes it possible to distinguish them
from real characters in the buffer.

The 'showbreak' option contains the string to put in front of wrapped lines.

                                                        *wrap-off*
If the 'wrap' option is off, long lines will not wrap.  Only the part that
fits on the screen is shown.  If the cursor is moved to a part of the line
that is not shown, the screen is scrolled horizontally.  The advantage of
this method is that columns are shown as they are and lines that cannot fit
on the screen can be edited.  The disadvantage is that you cannot see all the
characters of a line at once.  The 'sidescroll' option can be set to the
minimal number of columns to scroll.

All normal ASCII characters are displayed directly on the screen.  The <Tab>
is replaced with the number of spaces that it represents.  Other non-printing
characters are replaced with "^{char}", where {char} is the non-printing
character with 64 added.  Thus character 7 (bell) will be shown as "^G".
Characters between 127 and 160 are replaced with "~{char}", where {char} is
the character with 64 subtracted.  These characters occupy more than one
position on the screen.  The cursor can only be positioned on the first one.

If you set the 'number' option, all lines will be preceded with their
number.  Tip: If you don't like wrapping lines to mix with the line numbers,
set the 'showbreak' option to eight spaces: >
        ":set showbreak=\ \ \ \ \ \ \ \ "

If you set the 'list' option, <Tab> characters will not be shown as several
spaces, but as "^I".  A '$' will be placed at the end of the line, so you can
find trailing blanks.

In Command-line mode only the command-line itself is shown correctly.  The
display of the buffer contents is updated as soon as you go back to Command
mode.

The last line of the window is used for status and other messages.  The
status messages will

Title: Window Display Details: Wrapping, Line Indicators, and Special Characters
Summary
This section provides an in-depth look at how Vim displays buffer content within a window. It details how Vim handles lines that exceed window width, using wrapping, the 'linebreak' option, and the 'wrap' option. It explains the use of '~' and '@' characters to indicate the end of the buffer and lines that don't fit, respectively, and how the 'display' option with the "lastline" flag alters this behavior by replacing the end of the line with "@@@". The section also discusses how to display special characters (such as Tabs), how to show line numbers, how to customize wrap display using showbreak, and how the 'list' option impacts the display of tabs and trailing blanks. It concludes by mentioning that the buffer is updated when returning to Command mode and mentioning the last line of the window is reserved for messages.