I have the following [F3] key mapping defined in my .vimrc. This inserts a line of text into my file containing the current date such as 2012-01-20. It works in command or insert mode. How can I include an environment variable such as $LOGNAME or $HOME in this line so the output is something like 2012-01-20 - user123 -? Have tried variations of <C-R>=$LOGNAME<CR> however this only seems to work for the inoremap line.
nnoremap <F3> "=strftime("%Y-%m-%d")<CR>P
inoremap <F3> <C-R>=strftime("%Y-%m-%d")<CR>