Pergunta sobre o buffer Vi / Vim

1

Acabei de começar a usar o editor Vi / Vim e enquanto eu estou verificando a lista de buffers ativos para o buffer que estou usando eu recebo esta linha:

1 %a + "buffername"                   line 16    

O que %a + representa na linha?

Eu sei que:

  • 1 - representa o buffer numerado
  • "nome do buffer" - representa o buffer nomeado
  • linha 16 - quantas linhas existem no arquivo sob esse buffer.

Obrigado :)

    
por Miloš Stojanović 27.11.2018 / 15:46

1 resposta

2

Veja :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

Portanto, %a + indica que esse buffer é:

  • o buffer na janela ativa
  • um buffer ativo
  • um buffer modificado
por 27.11.2018 / 16:01

Tags