Skip to content

Commit

Permalink
Expand tab in JS, HTML, CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamish Downer committed Mar 29, 2018
1 parent 0c6b453 commit 06b4bde
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vim/autocmds.vim
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ if has("autocmd")

" for HTML, generally format text, but if a long line has been created leave it
" alone when editing:
autocmd FileType html,htmldjango setlocal formatoptions+=tl noexpandtab softtabstop=2 tabstop=2 shiftwidth=2
autocmd FileType html,htmldjango setlocal formatoptions+=tl expandtab softtabstop=2 tabstop=2 shiftwidth=2

autocmd FileType javascript setlocal noexpandtab softtabstop=4 tabstop=4 shiftwidth=4
autocmd FileType javascript setlocal expandtab softtabstop=4 tabstop=4 shiftwidth=4

" for HTML, generally format text, but if a long line has been created leave it
" alone when editing:
autocmd FileType php setlocal formatoptions+=tl noexpandtab softtabstop=2 tabstop=2 shiftwidth=2
autocmd FileType php setlocal formatoptions+=tl expandtab softtabstop=2 tabstop=2 shiftwidth=2

" for both CSS and HTML, use genuine tab characters for indentation, to make
" files a few bytes smaller:
autocmd FileType css setlocal noexpandtab softtabstop=2 tabstop=2 shiftwidth=2 smartindent
autocmd FileType css setlocal expandtab softtabstop=2 tabstop=2 shiftwidth=2 smartindent

autocmd FileType rst setlocal expandtab softtabstop=2 tabstop=2 shiftwidth=2 smartindent

Expand Down

0 comments on commit 06b4bde

Please sign in to comment.