1" An example for a vimrc file. 2" 3" Maintainer: Bram Moolenaar <[email protected]> 4" Last change: 2019 Dec 17 5" 6" To use it, copy it to 7" for Unix: ~/.vimrc 8" for Amiga: s:.vimrc 9" for MS-Windows: $VIM\_vimrc 10" for Haiku: ~/config/settings/vim/vimrc 11" for OpenVMS: sys$login:.vimrc 12 13" When started as "evim", evim.vim will already have done these settings, bail 14" out. 15if v:progname =~? "evim" 16 finish 17endif 18 19" Get the defaults that most users want. 20source $VIMRUNTIME/defaults.vim 21 22if has("vms") 23 set nobackup " do not keep a backup file, use versions instead 24else 25 set backup " keep a backup file (restore to previous version) 26 if has('persistent_undo') 27 set undofile " keep an undo file (undo changes after closing) 28 endif 29endif 30 31if &t_Co > 2 || has("gui_running") 32 " Switch on highlighting the last used search pattern. 33 set hlsearch 34endif 35 36" Put these in an autocmd group, so that we can delete them easily. 37augroup vimrcEx 38 au! 39 40 " For all text files set 'textwidth' to 78 characters. 41 autocmd FileType text setlocal textwidth=78 42augroup END 43 44" Add optional packages. 45" 46" The matchit plugin makes the % command work better, but it is not backwards 47" compatible. 48" The ! means the package won't be loaded right away but when plugins are 49" loaded during initialization. 50if has('syntax') && has('eval') 51 packadd! matchit 52endif 53