-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
52 lines (45 loc) · 1007 Bytes
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
fu! Select_tab_style()
if search('^\t', 'n', 150)
set noexpandtab
el
" Spaces, not tabs
set expandtab
en
endf
if has("gui_running")
syntax on
set hlsearch
colorscheme peachpuff
set bs=2
set ai
set ruler
else
syntax on
set hlsearch
set bs=2
set ai
set ruler
set shiftwidth=2
set tabstop=2
set smarttab
set softtabstop=2
au BufRead,BufNewFile * call Select_tab_style()
" Don't expand tabs on Makefiles of shell scripts
au BufRead,BufNewFile Makefile*,*.sh,.*rc,.*profile set noexpandtab
" Do automatic indenting
set autoindent
set smartindent
" set nobackup
" set nowritebackup
" Show whitespaces
set list
set listchars=tab:>\
set listchars+=trail:.
" Add bad whitespace colouring
highlight BadWhitespace ctermbg=red guibg=red
"au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/
au BufRead,BufNewFile *.rb,*.rs,*.py,*.pyw,*.c,*.h,*.cpp,*.hpp,Makefile*,*.sh match BadWhitespace /\s\+$/
" Ignore case when searching
set ignorecase
set smartcase
endif