On 20/02/09 23:28, David Liang wrote:
> "thedate" is seen as a literal string by the :w command. You need to
> concatenate the value of thedate variable with the command:
> exec "w %.".thedate

or if that doesn't work:

        :exec 'w' expand('%') . '.' . thedate

where
        :exe[cute]
                executes the ex-command obtained by concatenating the
                expressions given as operands (if more than one
                expression, as above where there are two, separate them
                with one space each, as with ":echo").
        expand('%')
                returns the pathfilename of the current editfile
        .
                (between strings) is the "concatenation" operator


Best regards,
Tony.
-- 
At any given moment, an arrow must be either where it is or where it is
not.  But obviously it cannot be where it is not.  And if it is where
it is, that is equivalent to saying that it is at rest.
                -- Zeno's paradox of the moving (still?) arrow

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to