Skip to content

Instantly share code, notes, and snippets.

@fabianvf
Created June 28, 2019 19:01
Show Gist options
  • Save fabianvf/6c9b22fa8c9a415f3e79c06d5c21f4b1 to your computer and use it in GitHub Desktop.
Save fabianvf/6c9b22fa8c9a415f3e79c06d5c21f4b1 to your computer and use it in GitHub Desktop.
augroup configgroup
autocmd!
" rst
autocmd BufNewFile,BufRead *.txt setlocal ft=rst
autocmd FileType rst setlocal wrap nolist expandtab lbr shiftwidth=4 tabstop=4 softtabstop=4
\ formatoptions+=nqtl
" markdown
autocmd BufRead,BufNewFile *.md set filetype=markdown
autocmd FileType markdown setlocal wrap nolist expandtab lbr shiftwidth=4 tabstop=4 softtabstop=4
\ formatoptions+=nqtl
" yaml
autocmd FileType yaml setlocal shiftwidth=2 tabstop=2 softtabstop=2
" vim
autocmd FileType vim setlocal shiftwidth=2 tabstop=2 softtabstop=2
" javascript
autocmd FileType javascript setlocal shiftwidth=4 tabstop=4 softtabstop=4
" commit messages
autocmd Filetype gitcommit setlocal nolist textwidth=72
augroup END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment