Jun 24, 2010 #1 paublo ISP Joined Sep 14, 2006 Messages 127 Location 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
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
Jun 24, 2010 #2 Annihilannic MIS Joined Jun 22, 2000 Messages 6,317 Location AU Are you sure your .vimrc is being processed at all? Why *.c rather than *.db? Annihilannic. Upvote 0 Downvote
Jun 24, 2010 #3 Annihilannic MIS Joined Jun 22, 2000 Messages 6,317 Location AU I think the syntax you want is: Code: autocmd VimLeave *.db exe "!/root/test.sh" Annihilannic. Upvote 0 Downvote
Jun 28, 2010 Thread starter #4 paublo ISP Joined Sep 14, 2006 Messages 127 Location US thanks for the reply! Upvote 0 Downvote