Allow customizing name in signature comments
parent
afc637bde6
commit
1d3b97fc12
|
@ -40,7 +40,7 @@ inoremap <S-TAB> <C-D>
|
|||
set wildmode=longest,list
|
||||
|
||||
" Replace #d with a signature comment line
|
||||
if !exists('my_email')
|
||||
if !exists('g:my_email')
|
||||
if exists('$USER')
|
||||
let user = $USER
|
||||
elseif exists('$USERNAME')
|
||||
|
@ -48,10 +48,14 @@ if !exists('my_email')
|
|||
else
|
||||
let user = 'dustin'
|
||||
endif
|
||||
let my_email = user . '@' . hostname()
|
||||
let g:my_email = user . '@' . hostname()
|
||||
unlet user
|
||||
endif
|
||||
iab <expr> #d "# Dustin C. Hatch <" . my_email . "> (" . strftime("%d %b %Y") . ")"
|
||||
if !exists('g:my_name')
|
||||
let my_name = 'Dustin C. Hatch'
|
||||
endif
|
||||
iab <expr> #d "# " . g:my_name . " <" . g:my_email .
|
||||
\ "> (" . strftime("%d %b %Y") . ")"
|
||||
|
||||
" Platform specific stuff
|
||||
if has('win32')
|
||||
|
|
Reference in New Issue