I am trying to save file with a generated name from vim command mode. I am using the command:
:w !tee"/tmp/vim/$(date +'%s').tmp"
But it throws me an error that filename cannot be empty. Am I missing something here?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityUse:
:w !tee "/tmp/`date +'\%s'`.tmp"
Explanations:
$(...)
commands seem not to work in vim system calls.