何をしますか%a
および#
VIM
:buffersウィンドウの意味?
その情報は「: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」は、現在表示できるバッファを意味します。最後に、「#」は代替バッファーです。これは通常、最後に編集したバッファーを意味します。
さらに、ファイルの実行時に、リテラルファイル名の代わりに#
と%
が使用されます。たとえば、Pythonファイルを編集するときに、:!python %
と入力すると、現在のファイルがPythonファイルとして実行されます。同様に、%
を#
に置き換えると、代替ファイル。非常に便利です。:)