On Mon, December 20, 2010 1:40 pm, Roald de Vries wrote:
> I would like to be able to do:
>
>      :save ~/some/dir/
>
> ... in VIM in the same way I can do:
>
>      $ mv file ~/some/dir/
>
> ... in bash (so the file name is the same is of the current file). Is
> there a *reason* (in contrast with a *cause*) that this is not
> possible now? Could this be implemented?

You can probably script it. This one might do what you want:
:com! -complete=dir -nargs=1 Save :exe ':saveas ' . <q-args>
\(<q-args>[-1:] =~ '[\\/]$' ? '' : '/') . fnamemodify(@%, ":p:t")

which saves the current file in the specified directory. It won't move it,
though. But that could easily be added as well.

regards,
Christian


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

Raspunde prin e-mail lui