summaryrefslogtreecommitdiff
path: root/.vimrc
blob: a15e795ec412094a116f3851152d2deb51221928 (plain)
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
syntax on
colo industry
set number
set mouse-=a
set backspace=indent,eol,start
set wildmode=longest:full,full
filetype plugin indent on
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
set breakindent
set formatoptions=t1
set lbr
"set viminfo='100,<1000,s100,h
set viminfo='20,<100000

" highlight stray spaces and tabs when out of insert mode
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
autocmd FileType go setlocal noet ts=4 sw=4
autocmd FileType markdown setlocal tw=80 et ts=2 sw=2
autocmd FileType python setlocal et ts=4 sw=4
autocmd FileType text setlocal tw=80
autocmd FileType html setlocal et ts=2 sw=2
autocmd FileType c setlocal noet ts=8 sw=8 tw=80
autocmd FileType h setlocal noet ts=8 sw=8 tw=80
autocmd FileType cpp setlocal noet ts=8 sw=8 tw=80