Meino Christian Cramer wrote:
Hi,

 I am looking for a way to execute some lines of vim-script everytime
 when ich leave vim (end the programm).

 Are there any "hooks", which I can use for such a task ?

 Keep hacking!
 mcc


        :autocmd VimLeave * " any ex-command here

Most (but not all) autocommands can be placed on one line, separated by | (A few will take a following | as part of their arguments.)

You can also use several ":autocmd" lines (the autocommands are executed in the order defined), or, if you want a more complex script, you can e.g. do

        :autocmd VimLeave * source ~/.vim/macros/logout.vim

see
        :help :autocmd
        :help VimLeave


Best regards

Reply via email to