Tuesday, August 20, 2013

Re: strange behavior: ":w" only writes new buffers to disk, not open them.

Thanks Tim,

a) I'm talking about the first one.
b)
:version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jul 27 2011 19:46:24)
MacOS X (unix) version
c) "vim -u NONE" makes vim works as expected.

what do you think?

Leo


On Tue, Aug 20, 2013 at 10:34 PM, Tim Chase <vim@tim.thechases.com> wrote:
> On 2013-08-20 18:16, leo wrote:
>> when a create new buffer, for instance ":w test.txt", vim
>> only writes/creates the file test, but it no longer opens
>> it by default. Is there any option that controls that?
>
> I'm not quite sure I understand what you mean by "no longer opens it
> by default". Based on my reading, there are two possible meanings
> that occur to me:
>
> 1) when creating a new buffer (":new") and then writing it (":w
> test.txt"), it writes the file but doesn't change the buffer-name to
> associate it with the file on disk. If this is the case, this is
> clearly a regression. I'd test to see if you can duplicate it with
> after you've started vim with "vim -u NONE" to eliminate any
> possibility of vimrc files interfering.
>
> 2) when creating a new buffer against an existing file (":e
> existing.txt") and then writing a new file (":w test.txt"), it
> doesn't change the file-name (i.e., subsequent writes write to
> "existing.txt"), this is the expected behavior. To write to a new
> file and change to that one instead, you want to use ":saveas
> test.txt" instead of ":w test.txt"
>
>
> It would help to know:
> - which one of the above you're talking about,
> - which version of Vim you're running ("7.2.314")
> - any plugins or particularly germane settings you might have in your
> vimrc
>
> -tim
>
>
>

--
--
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/groups/opt_out.

No comments:

Post a Comment