Re: Retaining undo levels
- Виктор Кожухаров wrote:
> В чт, 2007-05-31 в 22:09 +0200, A.J.Mechelynck написа:Ah, if it's no longer in any window _and_ not hidden but unloaded, then it
>> Виктор Кожухаров wrote:
>>> Is there a way to retain the undo levels, even when the buffer is not
>>> loaded in any windows/tabs? Right now, whenever I open another file in
>>> a window, the previous file loses it's undo levels, even though it is
>>> still inside the buffer list.
>> I /think/ the undo levels are by buffer. To undo the changes in one buffer,
>> first make that buffer active (e.g. by switching to its window or by
>> ":edit"ing it in the current window).
>> If I'm wrong, someone please correct me.
> No, if the buffer is no longer in any window, going back to it by
> editing the file or selecting the buffer by any means will not bring the
> undo levels. pressing 'u' will tell you that you are at the earliest
> change. What I'm asking is whether it's possible to make vim remember
> the buffer undo levels for each non-deleted buffer while vim is still
>> Всего хорошего,
loses its undo levels. But you may either "hide" it, or (more to my taste)
keep it in a window which may (with :set winminheight=0) be collapsed to a
status line and nothing else; and then (IIUC) the undo levels will be kept.
I notice that even with the "true tabs" of Vim 7 available, I still use
"Rolodex Vim" a lot; it essentially consists of ":set winheight=99999
winminheight=0" (without the quotes of course). This way, the current window
expands to full height and all other windows are reduced to just a status line
at either top or bottom. Think of a Rolodex phone directory at the office.
"I'd love to go out with you, but I have to floss my cat."