-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
125 lines (101 loc) · 2.26 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
syntax on
filetype plugin on
filetype indent on
set ai
"set backup
"set backupdir=~/.vimbackup
set nocompatible
set foldmethod=indent
set foldlevel=20
set backspace=2
set mouse=a
set noswapfile
set t_Co=256
colorscheme peaksea
set guifont=Monaco:h13
"colorscheme desert
"colorscheme github
set nu
" 去掉括号匹配显示
let loaded_matchparen = 1
let g:molokai_original=1
set tabstop=4
set expandtab
set shiftwidth=4
set smarttab
set softtabstop=4
set listchars=tab:>-
set lcs=trail:-
set list
" Set tab for html
autocmd FileType html :setlocal sw=2 ts=2 sts=2
" expand tab to spaces
set expandtab
set autoindent
set smartindent
set cindent
set hlsearch
set incsearch
"set completeopt
set completeopt=longest,menu
let OmniCpp_ShowPrototypeInAbbr=1
set ignorecase
let g:acp_completeOption = '.,w,b,u,t,i'
set tags+=.tags
"let &termencoding=&fileencoding
" auto encoding detecting
"set fileencodings=utf-8,cp936,big5,gb18030,ucs
"set encoding=utf-9
" hilight characters over 80 columns
" match DiffAdd '\%>80v.*'
"pair config
"noremap ( ()<ESC>i
"inoremap { {}<ESC>i
"inoremap [ []<ESC>i
" arrow map
imap <C-l> <Right>
imap <C-h> <Left>
map <C-n> \be
map <LEADER>q :qa!<CR>
map <LEADER>g :CommandTBuffer<CR>
" F2 to save files
map <F2> :w!<CR>
" jump to previous building error
map <F3> :cp<CR>
" jump to next building error
map <F4> :cn<CR>
noremap <C-x><C-f> :Ex<CR>
map <F6> :Tlist<CR>
vmap sy :w !pbcopy<CR><CR>
nmap syy :.w !pbcopy<CR><CR>
nmap sp :r !pbpaste<CR><CR>
" F11 toggle paste mode
set pastetoggle=<F9>
"set guioptions-=m
set guioptions-=T
set guioptions-=r
set noerrorbells visualbell t_vb=
autocmd GUIEnter * set visualbell t_vb=
""" Plugins管理
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Plugin 'valloric/youcompleteme'
Plugin 'AutoComplPop'
Plugin 'scrooloose/nerdtree'
Plugin 'majutsushi/tagbar'
Plugin 'kien/ctrlp.vim'
Plugin 'plasticboy/vim-markdown'
call vundle#end()
" TagBar && NERDTreeToggle
map <LEADER>n :NERDTreeToggle<CR>
map <LEADER>t :TagbarToggle<CR>
" ACP
let g:acp_enableAtStartup = 0
" Jedi
"let g:jedi#auto_initialization = 0
" 禁止弹出上面的提示, 如果需要文档,可以按K
" autocmd FileType python setlocal completeopt-=preview
" let g:jedi#popup_select_first=1
" Ctrlp
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'