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