From: sev Date: Mon, 14 Oct 2024 23:32:03 +0000 (-0500) Subject: fix vim tabulation and highlighting X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/commitdiff_plain/4fa653d992e741dd96b3c58a265b2fb71cd8b0b7?hp=57f9ed7a8fc80250bae6c6d0b48d68b64a677563 fix vim tabulation and highlighting - soft tabs should not affect normal tab size - highlighting was not being applied to all buffers --- diff --git a/etc/vim/.vimrc b/etc/vim/.vimrc index 9c1fd4c..7a142e4 100644 --- a/etc/vim/.vimrc +++ b/etc/vim/.vimrc @@ -39,11 +39,11 @@ unlet y set autoindent set colorcolumn=80 highlight ColorColumn term=NONE ctermbg=0 -autocmd FileType python setlocal tabstop=4 shiftwidth=4 expandtab -autocmd FileType markdown setlocal tabstop=4 shiftwidth=4 expandtab -autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 expandtab -autocmd FileType json setlocal tabstop=2 shiftwidth=2 expandtab -autocmd FileType html setlocal tabstop=2 shiftwidth=2 expandtab +autocmd FileType python setlocal softtabstop=4 shiftwidth=4 expandtab +autocmd FileType markdown setlocal softtabstop=4 shiftwidth=4 expandtab +autocmd FileType javascript setlocal softtabstop=2 shiftwidth=2 expandtab +autocmd FileType json setlocal softtabstop=2 shiftwidth=2 expandtab +autocmd FileType html setlocal softtabstop=2 shiftwidth=2 expandtab autocmd FileType todo setlocal colorcolumn=0 set cursorline @@ -58,7 +58,7 @@ autocmd FocusLost * setlocal norelativenumber autocmd FocusGained * setlocal relativenumber highlight WhiteSpaceBol ctermfg=DarkBlue highlight WhiteSpaceMol ctermfg=Black -match WhiteSpaceMol / / -2match WhiteSpaceBol /\(^ \+\)\|\( \+$\)/ +autocmd BufEnter * 2match WhiteSpaceBol /\(^ \+\)\|\( \+$\)/ +autocmd BufEnter * match WhiteSpaceMol / / let g:EditorConfig_enable_for_new_buf = 1