-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
148 lines (134 loc) · 4.2 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
" Vundle >>>>>>
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
"call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
" Plugin 'Valloric/YouCompleteMe'
"Plugin 'VundleVim/Vundle.vim'
"Plugin 'scrooloose/nerdtree'
"Plugin 'bling/vim-airline'
"Plugin 'kien/ctrlp.vim'
"Plugin 'altercation/vim-colors-solarized'
"Plugin 'flazz/vim-colorschemes'
"Plugin 'easymotion/vim-easymotion'
"Plugin 'octol/vim-cpp-enhanced-highlight'
"Plugin 'hzchirs/vim-material'
"Plugin 'rdnetto/YCM-Generator'
"Plugin 'embear/vim-localvimrc'
"Plugin 'scrooloose/syntastic'
"Plugin 'nvie/vim-flake8'
" All of your Plugins must be added before the following line
"call vundle#end() " required
"filetype plugin indent on " required
" <<<<<< Vundle
" NERDTree >>>>>>
"autocmd vimenter * NERDTree
nnoremap tt :NERDTree %:h<CR>
nnoremap H :bprevious<CR>
nnoremap L :bnext<CR>
nnoremap K :bdelete<CR>
" <<<<<< NERDTree
" easymotion >>>>>>
nmap fs <Plug>(easymotion-s)
nmap ff <Plug>(easymotion-s2)
"nmap ft <Plug>(easymotion-t2)
nmap fw <Plug>(easymotion-bd-w)
nmap fl <Plug>(easymotion-lineforward)
nmap fj <Plug>(easymotion-j)
nmap fk <Plug>(easymotion-k)
nmap fh <Plug>(easymotion-linebackward)
" <<<<<< easymotion
" airline >>>>>>
set t_Co=256
set laststatus=2
let g:airline_powerline_fonts=1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#syntastic#enabled=1
let g:airline_powerline_fonts=1
"let g:airline_theme='wahaha'
let g:airline_theme='solarized'
let g:airline_left_sep = ' '
" <<<<<< airline
" ctrlp >>>>>>
let g:ctrlp_max_files = 0
set wildignore+=*_log*,*.a,*.o,*ficus,*unittest,*functest,*.log,*.class,*.jar,*log_info*
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
let g:ctrlp_user_command = {
\ 'types': {
\ 1: ['.git', 'cd %s && git ls-files --cached --exclude-standard --others']
\ }
\ }
" <<<<< ctrlp
" solarized >>>>>>
set background=dark
"colorscheme wahaha
"colorscheme vim-material
"colorscheme solarized
let g:solarized_termcolors= 256
let g:solarized_termtrans = 0
let g:solarized_degrade = 0
let g:solarized_bold = 1
let g:solarized_underline = 1
let g:solarized_italic = 1
let g:solarized_contrast = "high"
let g:solarized_visibility= "high"
" <<<<< solarized
" basic >>>>>>
syntax on
set nocompatible
set ruler
set nu
set scrolloff=3
set ts=4 sw=4
set expandtab
set nobackup
set noswapfile
set cindent
set autoindent
set backspace=2
set showmatch
set smartindent
set softtabstop=4
set shiftwidth=4
set hlsearch
hi Search term=standout ctermfg=white ctermbg=63
hi Normal ctermbg=none
set cursorline
set cursorcolumn
if filereadable($HOME."/ficus/tags")
set tags=~/ficus/tags
endif
if has("autocmd")
filetype plugin indent on
augroup vimrcEx
au!
autocmd FileType text setlocal textwidth=78
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
augroup END
endif " has("autocmd")
" <<<<<< basic
" basic map >>>>>>
:map <TAB> :e %:p:s,.h$,.X123X,:s,.cpp$,.h,:s,.X123X$,.cpp,<CR>
:map <F3> <C-]>
" <<<<<< basic map
" other >>>>>>
let g:omni_sql_no_default_maps = 1
" <<<<<< other
""""""""""""""""""""""""""""""
" ycm setting
"""""""""""""""""""""""""""""""
let g:ycm_global_ycm_extra_conf='/home/lding/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
let g:ycm_collect_identifiers_from_tag_files = 1
let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_confirm_extra_conf=0
let g:ycm_key_invoke_completion = '<C-/>'
nnoremap <F5> :YcmForceCompileAndDiagnostics<CR>
""""""""""""""""""""""""""""""
" localrc setting
"""""""""""""""""""""""""""""""
"let python_highlight_all=1