From 5b6acb00eef02c84f3eb84ec37f424b39a716a58 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Mon, 25 May 2020 17:30:38 +0200 Subject: [PATCH] make use of tab (unless python or doctest) --- .vimrc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) 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