Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vim exit - autocmd

Status
Not open for further replies.

paublo

ISP
Sep 14, 2006
127
US
hi im looking for a way to have vim execute a command when :wq is used on a filename that is *.db.

im looking to have named-checkzone executed when someone edits a zone file.


tried a few things on /etc/vmrc

autocmd VimLeave *.c /root/test.sh

but nothing.


thanks, Paul

 
Are you sure your .vimrc is being processed at all?

Why *.c rather than *.db?

Annihilannic.
 
I think the syntax you want is:

Code:
autocmd VimLeave *.db exe "!/root/test.sh"

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top