diff --git a/vimrc b/vimrc index 172f7d1..c33038c 100644 --- a/vimrc +++ b/vimrc @@ -330,8 +330,8 @@ au BufNewFile,BufRead *.js,*.java \ set tabstop=2 | \ set softtabstop=2 | \ set shiftwidth=2 | + \ set noexpandtab | \ set textwidth=79 | - \ set expandtab | \ set autoindent | \ set fileformat=unix @@ -359,8 +359,9 @@ highlight BadWhitespace ctermbg=red guibg=red " Display tabs at the beginning of a line in Python mode as bad. au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/ +au BufRead,BufNewFile *.js match BadWhitespace /^\s\+/ " Make trailing whitespaces be flagged as bad. -au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ +au BufRead,BufNewFile *.js,*.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ " yaml syntax " https://www.vim.org/scripts/script.php?script_id=739