summaryrefslogtreecommitdiff
path: root/.vimrc
blob: ba3c73cf2c15a92b1d93730880ff39ef29117a7e (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
33
34
35
36
37
38
39
40
41
42
43
44
syntax on
colo simple-dark
set number
set mouse-=a
set backspace=indent,eol,start
set wildmode=longest:full,full
filetype plugin indent on
set background=dark
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
xnoremap p pgvy

" 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 tw=80
autocmd FileType markdown setlocal spell 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
autocmd FileType gitcommit setlocal spell

"tags
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
map <A-]> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
set tags=./.tags,tags;

let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'