-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
204 lines (149 loc) · 5.07 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
" .vimrc
" -----------------------------------------------------------------------------
" *****************************************************************************
set nocompatible " be iMproved, required
filetype off " required
" 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 'VundleVim/Vundle.vim'
Bundle 'ervandew/supertab'
"Plugin 'ericcurtin/CurtineIncSw.vim'
Plugin 'bling/vim-airline'
Plugin 'bling/vim-bufferline'
"Plugin 'easymotion/vim-easymotion'
"Plugin 'Yggdroot/indentLine'
Plugin 'triglav/vim-visual-increment'
Plugin 'jeffkreeftmeijer/vim-numbertoggle'
"Plugin 'severin-lemaignan/vim-minimap'
Plugin 'Valloric/YouCompleteMe'
Plugin 'scrooloose/syntastic'
Plugin 'octol/vim-cpp-enhanced-highlight'
" Track the engine.
Plugin 'SirVer/ultisnips'
" Snippets are separated from the engine. Add this if you want them:
Plugin 'honza/vim-snippets'
" Plugin 'ntpeters/vim-better-whitespace'
" The following are examples of different formats supported.
" " All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" " To ignore plugin indent changes, instead use:
" "filetype plugin on
" "
" " Brief help
" " :PluginList - lists configured plugins
" " :PluginInstall - installs plugins; append `!` to update or just
" :PluginUpdate
" " :PluginSearch foo - searches for foo; append `!` to refresh local cache
" " :PluginClean - confirms removal of unused plugins; append `!` to
" auto-approve removal
" "
" " see :h vundle for more details or wiki for FAQ
" " Put your non-Plugin stuff after this line
set exrc
" Number settings
set number
" set relativenumber
" Colorscheme
set background=dark
" Better file searching
set wildmenu
syntax enable
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=8
" " when indenting with '>', use 4 spaces width
set shiftwidth=8
" " On pressing tab, insert 4 spaces
set expandtab
set smarttab
set listchars=tab:>-,trail:~,extends:>,precedes:<
set list
autocmd FileType make setlocal noexpandtab
autocmd FileType dts setlocal noexpandtab
" Highlight current line
"set cursorline
" Better searching
set hlsearch
set incsearch
set smartcase
"set ignorecase
" Ignore compiled files
set wildignore=*.o,*~,*.pyc
" Enable buffer switching without saving
set hidden
" Show the current command-key-combination at the right side in the status bar
set showcmd
" For regular expressions set magic on
set magic
" Show matching brackets when text inidicator is over them
set showmatch
" Enable folding
set foldenable
set scrolloff=8
"if exists('+colorcolumn')
"set colorcolumn=80,100,120
"endif
" Set foldmethod to indent
" set foldmethod=indent
" Absolute numbers on focusloss/relative numbers on focusgain
" au FocusLost * :set number
" au FocusGained * :set relativenumber
" Enable list of buffers
let g:airline#extensions#tabline#enabled = 1
" Show just the filename
let g:airline#extensions#tabline#fnamemod = ':t'
"let g:airline_section_b = '%{strftime("%c")}'
"let g:airline_section_y = 'BN: %{bufnr("%")}'
" Easymotion config
let g:EasyMotion_do_mapping = 0
nmap s <Plug>(easymotion-overwin-f2)
map <leader>j <Plug>(easymotion-j)
map <leader>k <Plug>(easymotion-k)
nnoremap <F6> :bp <CR>
nnoremap <F7> :bn <CR>
nnoremap <F9> :Explore <CR>
let g:airline_symbols = {}
" Remove trailing whitespace using <F5>
" nnoremap <silent> <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR>
" Better whitespace
" let g:strip_whitespace_on_save = 1
imap jj <Esc>
map <F10> :%!astyle --style=kr --indent=spaces=8 --indent-switches --indent-classes --pad-oper --pad-header --unpad-paren --convert-tabs <CR>
" set colorcolumn=120
set columns=120
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:cpp_class_scope_highlight = 1
let g:cpp_member_variable_highlight = 1
let g:cpp_class_decl_highlight = 1
let g:cpp_concepts_highlight = 1
let g:ycm_show_diagnostics_ui = 0
"map <F5> :call CurtineIncSw()<CR>
"nnoremap <F5> :!make<cr>\
" make YCM compatible with UltiSnips (using supertab)
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
let g:SuperTabDefaultCompletionType = '<C-n>'
"" better key bindings for UltiSnipsExpandTrigger
"let g:UltiSnipsExpandTrigger = "<tab>"
"let g:UltiSnipsJumpForwardTrigger = "<tab>"
"let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
""
"let g:UltiSnipsSnippetsDir='/home/mdekoninck/.vim/bundle/vim-snippets/UltiSnips'
"let g:UltiSnipsSnippetDirectories='/home/mdekoninck/.vim/bundle/vim-snippets/UltiSnips'
"
let g:UltiSnipsExpandTrigger="<c-j>"
let g:UltiSnipsJumpForwardTrigger="<c-j>"
let g:UltiSnipsJumpBackwardTrigger="<c-k>"
set secure