> lessthanideal wrote:
>> Suppose the current working directory is "C:\" and I am
>> editing "C:\temp\test.txt". I issue the command
>>
>> :saveas test2.txt
>>
>> The file is saved as C:\test2.txt, hHow can I make it be
>> saved as C:\temp\test2.txt?
>
> The way :saveas is working is correct because if you do not
> specify a directory, Vim's current directory should be used.
>
> What you want is something like this:
> :saveas %:p:h/newname.txt
Alternatively, you could use one of the many tricks to ensure the
current directory matches the directory of the file in the current
buffer. If you search the Vim tips wiki, I'm sure you'll find a few ways
to do that if you're interested.
Ben.
--
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
No comments:
Post a Comment