Monday, March 1, 2010

:buffers output - gather it on a specific buffer

Vim 7.2.367

Does anyone know how to get the same data :buffers provides for the
current buffer?

From the :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

So, assuming I am in the BufEnter autocmd, I want to gather the above
information:
1. For the current buffer.
2. For a bufnr I specify


The problem I have is running :buffers and redirecting this output
when you have > 50 buffers open is taking too long. Really, we just
need to do this one the current buffer and the alternate and update
what we currently have. So I am trying to do this to address
performance issues.

Thanks,
Dave

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: