diff --git a/.vimrc b/.vimrc index b3ad2d8..4e3a535 100644 --- a/.vimrc +++ b/.vimrc @@ -1,15 +1,17 @@ set laststatus=2 +set encoding=utf-8 +set autoindent + filetype indent plugin on -" show existing tab with 4 spaces width + +" Global tab settings set tabstop=4 -" when indenting with '>', use 4 spaces width set shiftwidth=4 -" On pressing tab, insert 4 spaces +set softtabstop=4 set expandtab -" hilight tab -highlight SpecialKey ctermfg=1 -set list -set listchars=tab:T> + +" Set to show invisibles (tabs & trailing spaces) & their highlight color +set list listchars=tab:»\ ,trail:· set number @@ -47,5 +49,7 @@ function SetGPGOptions() set foldopen=insert endfunction -" Set to show invisibles (tabs & trailing spaces) & their highlight color -set list listchars=tab:»\ ,trail:· +if has("autocmd") + " Set filetype tab settings + autocmd FileType python,doctest set ai ts=4 sw=4 sts=4 et +endif