Advertisement
Guest User

vimrc_example.vim

a guest
Nov 12th, 2016
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.41 KB | None | 0 0
  1. " An example for a vimrc file.
  2. "
  3. " Maintainer:   Bram Moolenaar <Bram@vim.org>
  4. " Last change:  2016 Jul 28
  5. "
  6. " To use it, copy it to
  7. "     for Unix and OS/2:  ~/.vimrc
  8. "         for Amiga:  s:.vimrc
  9. "  for MS-DOS and Win32:  $VIM\_vimrc
  10. "       for OpenVMS:  sys$login:.vimrc
  11.  
  12. " When started as "evim", evim.vim will already have done these settings.
  13. if v:progname =~? "evim"
  14.   finish
  15. endif
  16.  
  17. " Get the defaults that most users want.
  18. source $VIMRUNTIME/defaults.vim
  19.  
  20. if has("vms")
  21.   set nobackup      " do not keep a backup file, use versions instead
  22. else
  23.   set backup        " keep a backup file (restore to previous version)
  24.   if has('persistent_undo')
  25.     set undofile    " keep an undo file (undo changes after closing)
  26.   endif
  27. endif
  28.  
  29. if &t_Co > 2 || has("gui_running")
  30.   " Switch on highlighting the last used search pattern.
  31.   set hlsearch
  32. endif
  33.  
  34. " Only do this part when compiled with support for autocommands.
  35. if has("autocmd")
  36.  
  37.   " Put these in an autocmd group, so that we can delete them easily.
  38.   augroup vimrcEx
  39.   au!
  40.  
  41.   " For all text files set 'textwidth' to 78 characters.
  42.   autocmd FileType text setlocal textwidth=78
  43.  
  44.   augroup END
  45.  
  46. else
  47.  
  48.   set autoindent        " always set autoindenting on
  49.  
  50. endif " has("autocmd")
  51.  
  52. " Add optional packages.
  53. "
  54. " The matchit plugin makes the % command work better, but it is not backwards
  55. " compatible.
  56. if has('syntax') && has('eval')
  57.   packadd matchit
  58. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement