| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | " An example for a vimrc file. | 
					
						
							|  |  |  | " | 
					
						
							|  |  |  | " Maintainer:	Bram Moolenaar <Bram@vim.org> | 
					
						
							| 
									
										
										
										
											2019-12-17 21:27:18 +01:00
										 |  |  | " Last change:	2019 Dec 17 | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | " | 
					
						
							|  |  |  | " To use it, copy it to | 
					
						
							| 
									
										
										
										
											2019-12-17 21:27:18 +01:00
										 |  |  | "	       for Unix:  ~/.vimrc | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | "	      for Amiga:  s:.vimrc | 
					
						
							| 
									
										
										
										
											2019-12-17 21:27:18 +01:00
										 |  |  | "	 for MS-Windows:  $VIM\_vimrc | 
					
						
							| 
									
										
										
										
											2020-02-26 16:16:53 +01:00
										 |  |  | "	      for Haiku:  ~/config/settings/vim/vimrc | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | "	    for OpenVMS:  sys$login:.vimrc | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-03 15:27:20 +01:00
										 |  |  | " When started as "evim", evim.vim will already have done these settings, bail | 
					
						
							|  |  |  | " out. | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | if v:progname =~? "evim" | 
					
						
							|  |  |  |   finish | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-07-28 22:24:15 +02:00
										 |  |  | " Get the defaults that most users want. | 
					
						
							|  |  |  | source $VIMRUNTIME/defaults.vim | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if has("vms") | 
					
						
							|  |  |  |   set nobackup		" do not keep a backup file, use versions instead | 
					
						
							|  |  |  | else | 
					
						
							| 
									
										
										
										
											2014-02-05 22:02:01 +01:00
										 |  |  |   set backup		" keep a backup file (restore to previous version) | 
					
						
							| 
									
										
										
										
											2016-07-28 22:24:15 +02:00
										 |  |  |   if has('persistent_undo') | 
					
						
							|  |  |  |     set undofile	" keep an undo file (undo changes after closing) | 
					
						
							|  |  |  |   endif | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | endif | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if &t_Co > 2 || has("gui_running") | 
					
						
							| 
									
										
										
										
											2016-07-28 22:24:15 +02:00
										 |  |  |   " Switch on highlighting the last used search pattern. | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  |   set hlsearch | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-03 15:27:20 +01:00
										 |  |  | " Put these in an autocmd group, so that we can delete them easily. | 
					
						
							|  |  |  | augroup vimrcEx | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  |   au! | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   " For all text files set 'textwidth' to 78 characters. | 
					
						
							|  |  |  |   autocmd FileType text setlocal textwidth=78 | 
					
						
							| 
									
										
										
										
											2019-02-03 15:27:20 +01:00
										 |  |  | augroup END | 
					
						
							| 
									
										
										
										
											2007-05-05 18:24:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-25 17:02:51 +01:00
										 |  |  | " Add optional packages. | 
					
						
							|  |  |  | " | 
					
						
							|  |  |  | " The matchit plugin makes the % command work better, but it is not backwards | 
					
						
							|  |  |  | " compatible. | 
					
						
							| 
									
										
										
										
											2017-09-27 22:23:55 +02:00
										 |  |  | " The ! means the package won't be loaded right away but when plugins are | 
					
						
							|  |  |  | " loaded during initialization. | 
					
						
							| 
									
										
										
										
											2016-06-26 16:17:58 +02:00
										 |  |  | if has('syntax') && has('eval') | 
					
						
							| 
									
										
										
										
											2017-09-27 22:23:55 +02:00
										 |  |  |   packadd! matchit | 
					
						
							| 
									
										
										
										
											2016-06-26 16:17:58 +02:00
										 |  |  | endif |