-
Notifications
You must be signed in to change notification settings - Fork 1
/
vimrc
48 lines (37 loc) · 1.09 KB
/
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
set modeline
" indention
if has("autocmd")
filetype plugin indent on
endif
syntax on
set hlsearch
set showmatch
set autowrite
nmap <F4> :set invpaste paste?<CR>
imap <F4> <C-0> :set invpaste<CR>
set pastetoggle=<F4>
" spell checking
nmap <F5> :setlocal spell spelllang=en_us<CR>
" delete trailing whitespace at the end of each line
cmap :dtws :%s/[\ \t]\+$//<CR>
" show trailing whitespace at the end of each line
cmap :showws :/\s\+$<CR>
" jump to tag under curser
nmap <C-j> <C-]>
nmap <C-k> <C-t>
" settings for mutt
autocmd BufRead /tmp/mutt* set ft=mail
autocmd BufRead /tmp/mutt* set syntax=mail
" avoid UTF-8 problems
set encoding=utf-8
" automatically remove trailing whitespace before saving
" http://vim.wikia.com/wiki/Remove_unwanted_spaces
autocmd FileType c,cpp,h,hpp,java,php,pl,py,rb,sh autocmd BufWritePre <buffer> :call setline(1,map(getline(1,"$"),'substitute(v:val,"\\s\\+$","","")'))
" set syntax file for protocol buffers
augroup filetype
au! BufRead,BufNewFile *.proto setfiletype proto
augroup end
"colorscheme pablo
"colorscheme robinhood
"colorscheme xemacs
colorscheme jellybeans