On 16/09/12 19:45, Timothy Madden wrote:
On 09/16/2012 04:18 PM, Timothy Madden wrote:
Hello

In some situation if I try to edit a file like with
     :edit plugin/script.vim
I may end up with a buffer name like '../.vim/plugin/script.vim'

Note though two paths are equivalent, assuming the current directory is
named ".vim", still the buffer names are not the same in a literal sense.

This will happen when I already have the file opened (or listed) with
the long name (../.vim/plugin/script.vim), then I try to :edit it in a
different window with the short name.

In my script I would like to use :MkVimball command plugin from the
standard vimball plugin, and if I ran into this problem than MkVimball
will create for example a file like ../../src/vim/plugin/scriptname.vim
in the vimball archive. Even if the filename I pass to MkVimball really
is the right one, plugin/scriptname.vim.

I find that Vim will modify the arguments so as to match existing
buffers or previous arguments. Thus

:args ../dir/script.vim script.vim

becomes:

:args
../dir/script.vim ../dir/script.vim

That is, the second argument is modified to match the first one. The
same thing happens on the command line, too.

Is there a way to prevent this ?

Thank you,
Timothy Madden

Which Vim version and patchlevel are you using? I think there was a fix about that, but it was a long time ago.

Best regards,
Tony.
--
"You are old, father William," the young man said,
        "And your hair has become very white;
And yet you incessantly stand on your head --
        Do you think, at your age, it is right?"

"In my youth," father William replied to his son,
        "I feared it might injure the brain;
But, now that I'm perfectly sure I have none,
        Why, I do it again and again."
                -- Lewis Carrol

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

Reply via email to