On Dec 20, 2010, at 3:40 PM, Christian Brabandt wrote:
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.
Thanks, but I'm too lazy for that :-). I actually meant that saving to
a directory is a behavior that I would expect from :save, and I think
it would be good to support it.
Cheers, Roald
--
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