added autocmd function to vimrc