1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-16 06:47:52 +01:00
vim/runtime/vimrc_example.vim

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.4 KiB
VimL
Raw Permalink Normal View History

2004-06-13 20:20:40 +00:00
" An example for a vimrc file.
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
2004-06-13 20:20:40 +00:00
"
" To use it, copy it to
" for Unix: ~/.vimrc
2004-06-13 20:20:40 +00:00
" for Amiga: s:.vimrc
" for MS-Windows: $VIM\_vimrc
" 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
" 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
set backup " keep a backup file (restore to previous version)
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")
" 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
" 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