Sunday, April 5, 2015

Re: How to stop buffer number incrementing when writing to a temp file?

Hi Andy,

I'm not a vim expert, but it looks like we don't have a way to keep the buffer number from increasing. I haven't used vim's scratch buffer before, but maybe you can use that for editing a temp file.

From: http://vim.wikia.com/wiki/Vim_buffer_FAQ

Is it possible to configure Vim, by setting some option, to re-use the number of a deleted buffer for a new buffer?

No. Vim will not re-use the buffer number of a deleted buffer for a new buffer. Vim will always assign the next sequential number for a new buffer. The buffer number assignment is implemented this way, so that you can always jump to a buffer using the same buffer number. One method to achieve buffer number reordering is to restart Vim. If you restart Vim, it will re-assign numbers sequentially to all the buffers in the buffer list (assuming you have properly set 'viminfo' to save and restore the buffer list across Vim sessions).



--
--
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

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

No comments:

Post a Comment