关于 Vi/Vim 缓冲区的问题

关于 Vi/Vim 缓冲区的问题

我刚刚开始使用 Vi/Vim 编辑器,在检查缓冲区的活动缓冲区列表时,我得到了这一行:

1 %a + "buffername"                   line 16    

%a +线中代表 什么?

我知道:

  • 1 - 代表编号的缓冲区
  • “buffername” - 表示指定的缓冲区
  • 第 16 行 - 该缓冲区下的文件中有多少行。

谢谢 :)

答案1

:h :ls:

:ls[!] [flags]
    Show all buffers.  Example:

            1 #h   "/test/text"             line 1 
            2u     "asdf"                   line 0 
            3 %a + "version.c"              line 1 

[...]
    Indicators (chars in the same column are mutually exclusive):
    u       an unlisted buffer (only displayed when [!] is used)
               unlisted-buffer
     %      the buffer in the current window
     #      the alternate buffer for ":e #" and CTRL-^
      a     an active buffer: it is loaded and visible
      h     a hidden buffer: It is loaded, but currently not
               displayed in a window hidden-buffer
       -    a buffer with 'modifiable' off
       =    a readonly buffer
       R    a terminal buffer with a running job
       F    a terminal buffer with a finished job
       ?    a terminal buffer without a job: `:terminal NONE`
        +   a modified buffer
        x   a buffer with read errors

因此%a +表明该缓冲区是:

  • 活动窗口中的缓冲区
  • 主动缓冲器
  • 修改后的缓冲区

相关内容