| 
									
										
										
										
											2019-07-29 11:10:24 +02:00
										 |  |  | source ~/.vim/vundlerc.vim | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | syntax on | 
					
						
							|  |  |  | filetype plugin indent on | 
					
						
							|  |  |  | set omnifunc=syntaxcomplete#Complete | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | " unset mouse | 
					
						
							|  |  |  | set mouse= | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-31 21:26:30 +02:00
										 |  |  | " Maintain undo history between sessions | 
					
						
							|  |  |  | if !isdirectory("/tmp/.vim-undo-dir") | 
					
						
							|  |  |  |     call mkdir("/tmp/.vim-undo-dir", "", 0700) | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | set undodir=/tmp/.vim-undo-dir | 
					
						
							|  |  |  | set undofile | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-29 11:10:24 +02:00
										 |  |  | " Default tab is 4 spaces | 
					
						
							|  |  |  | set tabstop=4 | 
					
						
							|  |  |  | set softtabstop=4 | 
					
						
							|  |  |  | set shiftwidth=4 | 
					
						
							|  |  |  | set expandtab | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | " Highlight searches | 
					
						
							|  |  |  | set hlsearch | 
					
						
							|  |  |  | set showmatch | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | " Use TAB to switch between buffers | 
					
						
							|  |  |  | noremap <tab> :bn<CR> | 
					
						
							|  |  |  | noremap <S-tab> :bp<CR> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-02 17:21:15 +02:00
										 |  |  | " Highlight trailing whitespace (darker red) and remove all with Ctrl+k | 
					
						
							|  |  |  | highlight WhitespaceEOL ctermbg=red guibg=#ab0d0d | 
					
						
							| 
									
										
										
										
											2019-07-29 11:10:24 +02:00
										 |  |  | match WhitespaceEOL /\s\+\%#\@<!$/ | 
					
						
							|  |  |  | nnoremap <C-k> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR> | 
					
						
							| 
									
										
										
										
											2019-07-31 21:18:12 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-02 17:21:15 +02:00
										 |  |  | " Much better with Tomorrow Night Bright color theme set in alacritty | 
					
						
							| 
									
										
										
										
											2019-08-02 22:36:04 +02:00
										 |  |  | set background=dark | 
					
						
							|  |  |  | highlight Search ctermfg=Black | 
					
						
							|  |  |  | highlight Comment ctermfg=Grey | 
					
						
							| 
									
										
										
										
											2019-08-02 17:21:15 +02:00
										 |  |  | highlight SignColumn ctermbg=236 | 
					
						
							| 
									
										
										
										
											2019-08-02 22:36:04 +02:00
										 |  |  | highlight LineNr ctermfg=244 | 
					
						
							|  |  |  | highlight LineNr ctermbg=232 | 
					
						
							|  |  |  | highlight Folded ctermbg=DarkGreen | 
					
						
							|  |  |  | highlight Folded ctermfg=Black | 
					
						
							| 
									
										
										
										
											2019-08-02 17:21:15 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-02 11:41:58 +02:00
										 |  |  | " Language indents and line lengths | 
					
						
							| 
									
										
										
										
											2019-08-25 18:59:39 +02:00
										 |  |  | autocmd FileType py,rst,md      set textwidth=79 | 
					
						
							|  |  |  | autocmd FileType html,yaml,css  set softtabstop=2 shiftwidth=2 | 
					
						
							| 
									
										
										
										
											2019-07-31 21:18:12 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-29 11:10:24 +02:00
										 |  |  | " Toggles on different plugins/modes | 
					
						
							|  |  |  | noremap  <F1> :ToggleMouse<CR> | 
					
						
							|  |  |  | inoremap <F1> <Esc>:ToggleMouse<CR>a | 
					
						
							|  |  |  | nmap <F3> :set nonumber!<CR> | 
					
						
							|  |  |  | nmap <F5> :NERDTreeToggle<CR> | 
					
						
							|  |  |  | set pastetoggle=<F2> | 
					
						
							| 
									
										
										
										
											2019-08-20 21:07:15 +02:00
										 |  |  | nmap <leader>e :ALEDetail <cr> | 
					
						
							| 
									
										
										
										
											2019-07-29 11:10:24 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | " Enable vimrc files per project, e.g: ./project/.vimrc | 
					
						
							|  |  |  | set exrc | 
					
						
							|  |  |  | " Disable unsafe commands in project vimrc | 
					
						
							|  |  |  | set secure | 
					
						
							| 
									
										
										
										
											2019-08-25 18:59:39 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | " Plugin/language configuration | 
					
						
							|  |  |  | source ~/.vim/rust.vim | 
					
						
							|  |  |  | source ~/.vim/ale.vim | 
					
						
							|  |  |  | source ~/.vim/nerdtree.vim |