Vim:buffers%a和#是什么意思?


9

什么%a#在平均VIM缓冲区窗口:?

Vim:缓冲区窗口

Answers:


10

该信息包含在“ :help :buffers”中。我在这里引用它:

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
    +   a modified buffer
    x   a buffer with read errors

因此,要回答您的特定问题,“%”表示执行“ :buffers” 时光标所在窗口中的当前缓冲区。“ a”表示您当前可以看到的缓冲区。最后,“#”是备用缓冲区,通常表示您正在编辑的最后一个缓冲区。


5

另外,在执行文件时,使用#%代替文字文件名。例如,在编辑Python文件时,如果键入:!python %,它将当前文件作为Python文件执行。同样,替换%#执行备用文件。很有用。:)

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.