On Wed, Apr 01, 2015 at 03:21:15PM +0200, Christian Brabandt wrote:
> Am 2015-04-01 11:30, schrieb [email protected]:
> >I have some VimL where I write the current buffer to a temporary file like
> >this:
> >
> >    let tmp = tempname()
> >    execute 'keepalt silent write' tmp
> >
> >I then use the temporary file in an external command invoked with
> >system().  Finally I delete the temporary file:
> >
> >    call delete(tmp)
> >
> >At no point do I load, or want to load, the temporary file into a vim
> >buffer.
> >
> >However every time my VimL executes, a new buffer number is taken
> >because the temporary file is allocated an unlisted buffer (visible
> >with :ls!).  How can I prevent Vim allocating buffers for my temporary
> >files?
> >
> >For example:
> >
> >1. Open some file in Vim.  This is loaded into buffer 1.
> >2. Execute my VimL ten times.
> >3. Open some other file.
> >
> >Desired behaviour: "some other file" is loaded into buffer 2.
> >Actual behaviour: "some other file" is loaded into buffer 12.
> 
> I fail to understand, why this is a problem,

For people who sometimes like to switch buffers by using their numbers
(e.g.  myself), it's much nicer to be able to do 1<C-^>, 2<C-^>, 3<C-^>,
as opposed to 1<C-^>, 15<C-^>, 42<C-^>.

Marius Gedminas
-- 
We have enough youth, how about a fountain of SMART?

-- 
-- 
You received this message from the "vim_dev" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui