augroup benieAugroup " Clear all autocmd's in this group autocmd! " Reopening a file at last curson position au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") \ | exe "normal! g'\"" | endif " TODO: Move this to a plugin & rename to .enter .exit au BufRead,BufNewFile .env set filetype=zsh au BufRead,BufNewFile .out set filetype=zsh augroup END