Vi/Vimバッファに関する質問

Vi/Vimバッファに関する質問

Vi/Vimエディタを使い始めたばかりで、バッファのアクティブバッファのリストを確認すると、次の行が表示されました。

1 %a + "buffername"                   line 16    

%a +ラインは何を表していますか?

知っている:

  • 1 - 数値を表すバッファ
  • "buffername" - 指定されたバッファを示します。
  • Line 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 +バッファは次のようになります。

  • アクティブウィンドウのバッファ
  • アクティブバッファ
  • 変更されたバッファ

おすすめ記事