Customizing my .vimrc I added template (skeleton) file support. This auto-command rule from a book didn't do anything (no errors nor templates):
:autocmd BufNewFile * silent! Or $HOME/.vim/templates/%:e.tpl
This non-%e-wildcard version produced an error:
:autocmd BufNewFile *.html Or $HOME/.vim/templates/html.tpl
"test.html" [New File]
Error detected while processing BufNewFile Auto commands for "*.html":
E492: Not an editor command: Or $HOME/.vim/templates/html.tpl
In another post user orftz (+1) showed us an uncommon syntax (what I'd recognize as PHP) using concatenation and double quotes.
:autocmd BufNewFile * :silent! :exec ":0r " . $HOME . "/.vim/templates/" . &ft . ".tpl"
What's wrong with my version of the common and why does the other version work (I don't see any quoting in other vim scripts like this).