diff --git a/plugin/00-dustin.vim b/plugin/00-dustin.vim index 5e4e964..9af3934 100644 --- a/plugin/00-dustin.vim +++ b/plugin/00-dustin.vim @@ -33,7 +33,18 @@ inoremap jj inoremap " Replace #d with a signature comment line -iab #d "# Dustin C. Hatch (" . strftime("%d %b %Y") . ")" +if !exists('my_email') + if exists('$USER') + let user = $USER + elseif exists('$USERNAME') + let user = $USERNAME + else + let user = 'dustin' + endif + let my_email = user . '@' . hostname() + unlet user +endif +iab #d "# Dustin C. Hatch <" . my_email . "> (" . strftime("%d %b %Y") . ")" " Platform specific stuff if has('win32')