-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
230 lines (157 loc) · 5.36 KB
/
vimrc
File metadata and controls
230 lines (157 loc) · 5.36 KB
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
" Start Vundle configuration
" Required by Vundle; gets turned back on after configuration
filetype off
" Add Vundle.vim to runtime path, to initialize Vundle
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Plugin section - all plugins
" Plugins
" Alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" Let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" Add all your plugins here (note older versions of Vundle used Bundle instead
" of Plugin)
" Help folding
Plugin 'tmhedberg/SimpylFold'
" Plugin for function signature indentation
Plugin 'vim-scripts/indentpython.vim'
" Autocomplete for Python
Plugin 'Valloric/YouCompleteMe'
" Plugin for syntax checking
Plugin 'scrooloose/syntastic'
" Add browser tree
Plugin 'scrooloose/nerdtree'
" Search engine
Plugin 'kien/ctrlp.vim'
" Instal Airline
Plugin 'itchyny/lightline.vim'
" Plugin for ipython integration
Plugin 'julienr/vim-cellmode'
" Plugin for doxygen comment generation
Plugin 'vim-scripts/DoxygenToolkit.vim'
" Plugin for toggling comments
Plugin 'scrooloose/nerdcommenter'
" A Vim Plugin for Lively Previewing LaTeX PDF Output
Plugin 'xuhdev/vim-latex-live-preview'
" Plugin for bitbake
Plugin 'kergoth/vim-bitbake'
" Plugin for improved LaTeX
Plugin 'lervag/vimtex'
" Colorscheme settings
Plugin 'joshdick/onedark.vim'
"Colorschemes plugin
Plugin 'flazz/vim-colorschemes'
" Plugin for brackets pairing
Plugin 'jiangmiao/auto-pairs'
" Map section - map shortcuts
" Maps
" Maps GoTo to leader + g
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
" Shortcut for tree toggling (ctrl + n)
map <C-n> :NERDTreeToggle<CR>
map <leader><leader> <plug>NERDCommenterToggle
" Split navigations in normal mode (disable <C-W>)
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Enable folding with the spacebar
nnoremap <space> za
" Map <ESC> key to jj, in insert mode
imap jj <Esc>
" Let section - declaration of variables
" Lets
" Enables docstring preview for SimplyFold
let g:SimpylFold_docstring_preview=1
" Ensures that the preview window goes away
let g:ycm_autoclose_preview_window_after_completion=1
" Conf for YouCompleteMe - taken from Valloric, if needed change sth
let g:ycm_global_ycm_extra_conf = "/home/lazarc/.vim/bundle/.ycm_extra_conf.py"
" Variables for syntastic
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
" Ignore files in NERDTree
let NERDTreeIgnore=['\.pyc$', '\~$']
" NERDtree
let g:NERDCreateDefaultMappings = 0
let g:NERDSpaceDelims = 1
let g:NERDRemoveAltComs = 1
let g:NERDAltDelims_c = 1
" Some syntax highlighting options
let python_highlight_all=1
" Add different color past column 79 to indicate line break overstepping
let &colorcolumn=join(range(299,999),",")
" Set section - initialization of variables
" Sets
" On start up all indented lines will be folded
set foldmethod=indent
" Setting for syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
" Set something for airline
set laststatus=2
" Configure tab preferences
" Tab character is 4 spaces wide
set tabstop=4
" Tab key indents four spaces
set softtabstop=4
" Using << and >> shifts four spaces
set shiftwidth=4
" Text gets wrapped at column 79
set textwidth=79
" Tab press will produce spaces instead of tab character
set expandtab
" Automatically indent when pressing <CR>
set autoindent
" Disable italics
" Used for line termination (not same in DOS and Unix, '\r\n' and '\n')
set fileformat=unix
" Turn off permanent backups
set nobackup
" Turn off backups while writing to file
set nowritebackup
" Turn off undo files
set noundofile
" Set default syntax highlighting for assembly
au BufRead,BufNewFile *.asm set filetype=nasm
" Set postitioning of new splits
set splitbelow
set splitright
" Set relative line numbering
set rnu
" Give priority to local, project wire .vimrc files
set exrc
" Enablee UTF-8 encoding
set encoding=utf-8
" Set line numbers
set nu
" Disable lag when exiting insert mode
set timeoutlen=1000 ttimeoutlen=0
" Display whitespace and set listchars
set list
"set listchars=tab:▸\ ,eol:¬,extends:❯,precedes:❮
set listchars=tab:▸\ ,extends:❯,precedes:❮
set showbreak=↪
set termguicolors
" Highlight cursor row
set cursorline
" Set default clipboard to system clipboard
set clipboard=unnamedplus
" Remove trailing whitespace on file save
autocmd BufWritePre * %s/\s\+$//e
" Enable syntax highlighting
syntax on
" All of your Plugins must be added before the following line
call vundle#end()
filetype plugin indent on
" Colorscheme
colorscheme onedark
hi Normal guibg=NONE ctermbg=NONE
" Set lightline colorscheme
let g:lightline = {
\ 'colorscheme': 'onedark',
\}