-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
93 lines (83 loc) · 2.36 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
set wildmenu
set wildmode=list:longest
if has("autocmd")
filetype plugin indent on
call pathogen#infect()
autocmd BufNewFile *.h source ~/.vim/bundle/vim_bundles/hheader/hheader.vim
autocmd BufNewFile main.c source ~/.vim/bundle/vim_bundles/cmain/cmain.vim
autocmd BufNewFile *.c source ~/.vim/bundle/vim_bundles/cheader/cheader.vim
autocmd BufNewFile Makefile source ~/.vim/bundle/vim_bundles/makef/makef.vim
autocmd BufReadPost * if line("'\"") | exe "normal '\"" | endif
endif " has ("autocmd")
"Show current line
"""""""""""""""""""""""""""""
"=> Status line
"""""""""""""""""""""""""""""
" " Always show the status line
set laststatus=2
set showcmd
set nowrap
set noendofline binary
set nu
syntax on
set autoindent
set shiftwidth=4
set softtabstop=4
set ruler
set scrolloff=5
set history=400
set showmatch
set hlsearch
set incsearch
filetype on
noremap <C-l> :match
inoremap <C-l> <Esc>:match
map <Esc>Oq 1
map <Esc>Or 2
map <Esc>Os 3
map <Esc>Ot 4
map <Esc>Ou 5
map <Esc>Ov 6
map <Esc>Ow 7
map <Esc>Ox 8
map <Esc>Oy 9
map <Esc>Op 0
map <Esc>On .
map <Esc>OQ /
map <Esc>OR *
map <kPlus> +
map <Esc>OS -
map! <Esc>Oq 1
map! <Esc>Or 2
map! <Esc>Os 3
map! <Esc>Ot 4
map! <Esc>Ou 5
map! <Esc>Ov 6
map! <Esc>Ow 7
map! <Esc>Ox 8
map! <Esc>Oy 9
map! <Esc>Op 0
map! <Esc>On .
map! <Esc>OQ /
map! <Esc>OR *
map! <kPlus> +
map! <Esc>OS -
"highlight ExtraWhitespace ctermbg=red ctermfg=white guibg=red
"match ExtraWhitespace /\s\n/
set list
set listchars=trail:·,tab:>·
highlight SpecialKey guifg=blue ctermfg=lightblue
highlight ExtraWhitespace ctermbg=red guibg=red
highlight MissingWhitespace ctermbg=green guibg=green
highlight CKeywSpaceNext ctermbg=green guibg=green
highlight CKeywSpPar ctermbg=green guibg=green
highlight CKeywReturn ctermbg=green guibg=green
highlight EOFErr ctermbg=red guibg=red
"au BufWinEnter * silent loadview
au BufWinEnter * let w:m1=matchadd('ErrorMsg', '\%>80v.\+', -1)
au BufWinEnter *.c,*.h let w:m2=matchadd('ExtraWhitespace', '\s\+$\| \+\ze\t\| \|\t\zs \+', -1)
au BufWinEnter *.c,*.h let w:m3=matchadd('MissingWhitespace', ',[^ ]', -1)
au BufWinEnter *.c,*.h let w:m4=matchadd('CKeywSpaceNext', '\(ifndef\|define\|while\|return\|const\|typedef\|extern\|unsigned\)[^ ]', -1)
au BufWinEnter *.c let w:m5=matchadd('CKeywReturn', 'return [^(;]', -1)
au BufWinEnter *.c,*.h let w:m6=matchadd('CKeywSpPar', '[^a-zA-Z_0-9]\(while\|if\)\([^ a-zA-Z_0-9]\| [^(]\)', -1)
set mouse=a