On 13/03/14 23:22, Christian Brabandt wrote:
On Do, 13 Mär 2014, Bram Moolenaar wrote:
Tony Mechelynck wrote:
RFE: I propose a :noswapfile (or something) prefix, working in similar
fashion to the :verbose, :vertical, :top, :tab, etc. prefixes in front
of another ex-command, and with the meaning: If that _subordinate_
ex-command opens a new buffer, we want 'noswapfile' set on that buffer.
(If it doesn't, nothing happens, as with e.g. :vert :top or :tab when
the subordinate command opens no new window.) Or maybe :0swapfile and
:1swapfile prefixes.
Rationale: Currently, “:setlocal noswapfile” prior to opening a new
buffer would close the swapfile on the current buffer, not the new one;
while doing it afterwards opens and closes a swapfile for the new
buffer, which is less harmful but still not ideal.
In particular, I notice that “directory” windows handled by netrw have
swapfiles set on them: IMHO this is wasteful (and after a few crashes
you may find yourself with a string of .swp, .swo, .swn, .swm, etc., for
something which cannot ever need a recovery).
Makes sense. An alternative would be an argument along the line of ++bin:
:sp ++buftype=nofile scratch
Perhaps for netrw it would be
:sp ++buftype=nowrite dirname
Ah, interesting.
Please try out the attached patch.
Best,
Christian
Did you forget an entry in runtime/syntax/vim.vim or is that taken care
of automagically?
Best regards,
Tony.
--
It is all right to hold a conversation, but you should let go of it
now and then.
-- Richard Armour
--
--
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.