From: Nikolai Weibull Date: Tue, 13 Jun 2006 15:26:34 GMT Subject: Re: Thoughts on adding another hook to git Message-ID: In-Reply-To: <448EB7B6.4020708@shlrm.org> On 6/13/06, David Kowis wrote: > I'm using vim. > 1 # Explicit paths specified without -i nor -o; assuming --only paths... > 2 # > 3 # Updated but not checked in: > 4 # (will commit) > 5 # > 6 # modified: mail/abook/DETAILS > 7 # modified: mail/abook/HISTORY > > What I'd like to be able to do is have that "abook" directory name > automatically added to the top of my commit message before it gets into > the editor. I can do this with a script (echo ${PWD##*/}) but it'd need > to be a hook before the editor shows up. autocmd BufRead .git/COMMIT_MSG call setline(1, expand('%:p:h:h:t')) But that will of course do that for all commit-messages, so your point is still valid. nikolai