diff --git a/vim/vimrc b/vim/vimrc index 0e33673..8b42c6f 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -31,6 +31,8 @@ set hlsearch "highlight search results (using *) set shiftwidth=4 tabstop=4 autocmd FileType yaml,yml setlocal shiftwidth=2 softtabstop=2 expandtab +au BufRead,BufNewFile */playbooks/*.yml set filetype=yaml.ansible + " Return to last edit position when opening files (from amix's vimrc) au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif