I'm trying to automate file comment headers. I'm stuck trying to figure out how to insert the result of the uuidgen
command into my header using vim's autocmd.
Inside the header, the placeholder text is present, like this:
#ifndef _UUID_
#define _UUID_
// Code goes here!
#endif // _UUID_
The autocmd line to populate _UUID_
in .vimrc is:
autocmd bufnewfile *.h exe "1,$s/_UUID_/" . r!uuidgen ."/g"
The problem is coming in under r!uuidgen. How do i insert the result of a shell-command-execution as text in the autocmd line? Or in a vi substitution command for that matter?