From 1d3b97fc126e6ccd81f0429937f9adb6aace04db Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 7 Feb 2016 18:31:56 -0600 Subject: [PATCH] Allow customizing name in signature comments --- plugin/00-dustin.vim | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugin/00-dustin.vim b/plugin/00-dustin.vim index 5a5ea35..d572478 100644 --- a/plugin/00-dustin.vim +++ b/plugin/00-dustin.vim @@ -40,7 +40,7 @@ inoremap 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 #d "# Dustin C. Hatch <" . my_email . "> (" . strftime("%d %b %Y") . ")" +if !exists('g:my_name') + let my_name = 'Dustin C. Hatch' +endif +iab #d "# " . g:my_name . " <" . g:my_email . + \ "> (" . strftime("%d %b %Y") . ")" " Platform specific stuff if has('win32')