personal: tweak #d to allow different email addresses

master
Dustin C. Hatch 2012-08-06 23:25:30 -05:00
parent 4a1b531d16
commit 5860c6f165
1 changed files with 12 additions and 1 deletions

View File

@ -33,7 +33,18 @@ inoremap jj <esc><right>
inoremap <S-TAB> <C-D>
" Replace #d with a signature comment line
iab <expr> #d "# Dustin C. Hatch <dustin.hatch@softekinc.com> (" . 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 <expr> #d "# Dustin C. Hatch <" . my_email . "> (" . strftime("%d %b %Y") . ")"
" Platform specific stuff
if has('win32')