Mercurial > vim
annotate runtime/vimrc_example.vim @ 17744:4a3dca734d36 v8.1.1869
patch 8.1.1869: code for the argument list is spread out
commit https://github.com/vim/vim/commit/4ad62155a1015751a6645aaecd94b02c94c8934b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 17 14:38:55 2019 +0200
patch 8.1.1869: code for the argument list is spread out
Problem: Code for the argument list is spread out.
Solution: Put argument list code in arglist.c. (Yegappan Lakshmanan,
closes #4819)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 17 Aug 2019 14:45:04 +0200 |
parents | fe57e4f0eac1 |
children | ccd16426a1f9 |
rev | line source |
---|---|
7 | 1 " An example for a vimrc file. |
2 " | |
3 " Maintainer: Bram Moolenaar <Bram@vim.org> | |
15729 | 4 " Last change: 2019 Jan 26 |
7 | 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 | |
15729 | 12 " When started as "evim", evim.vim will already have done these settings, bail |
13 " out. | |
7 | 14 if v:progname =~? "evim" |
15 finish | |
16 endif | |
17 | |
9669
284b4eb307fc
commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
9344
diff
changeset
|
18 " Get the defaults that most users want. |
284b4eb307fc
commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
9344
diff
changeset
|
19 source $VIMRUNTIME/defaults.vim |
7 | 20 |
21 if has("vms") | |
22 set nobackup " do not keep a backup file, use versions instead | |
23 else | |
5637 | 24 set backup " keep a backup file (restore to previous version) |
9669
284b4eb307fc
commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
9344
diff
changeset
|
25 if has('persistent_undo') |
284b4eb307fc
commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
9344
diff
changeset
|
26 set undofile " keep an undo file (undo changes after closing) |
284b4eb307fc
commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
9344
diff
changeset
|
27 endif |
1668 | 28 endif |
7 | 29 |
30 if &t_Co > 2 || has("gui_running") | |
9669
284b4eb307fc
commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
9344
diff
changeset
|
31 " Switch on highlighting the last used search pattern. |
7 | 32 set hlsearch |
33 endif | |
34 | |
15729 | 35 " Put these in an autocmd group, so that we can delete them easily. |
36 augroup vimrcEx | |
7 | 37 au! |
38 | |
39 " For all text files set 'textwidth' to 78 characters. | |
40 autocmd FileType text setlocal textwidth=78 | |
15729 | 41 augroup END |
1125 | 42 |
8720
9380c37723f8
commit https://github.com/vim/vim/commit/aedfcbe1e6c7df6edcd6756d7601bfdec7dd2087
Christian Brabandt <cb@256bit.org>
parents:
6741
diff
changeset
|
43 " Add optional packages. |
9380c37723f8
commit https://github.com/vim/vim/commit/aedfcbe1e6c7df6edcd6756d7601bfdec7dd2087
Christian Brabandt <cb@256bit.org>
parents:
6741
diff
changeset
|
44 " |
9380c37723f8
commit https://github.com/vim/vim/commit/aedfcbe1e6c7df6edcd6756d7601bfdec7dd2087
Christian Brabandt <cb@256bit.org>
parents:
6741
diff
changeset
|
45 " The matchit plugin makes the % command work better, but it is not backwards |
9380c37723f8
commit https://github.com/vim/vim/commit/aedfcbe1e6c7df6edcd6756d7601bfdec7dd2087
Christian Brabandt <cb@256bit.org>
parents:
6741
diff
changeset
|
46 " compatible. |
12559 | 47 " The ! means the package won't be loaded right away but when plugins are |
48 " loaded during initialization. | |
9344
33c1b85d408c
commit https://github.com/vim/vim/commit/802a0d902fca423acb15f835d7b09183883d79a0
Christian Brabandt <cb@256bit.org>
parents:
8853
diff
changeset
|
49 if has('syntax') && has('eval') |
12559 | 50 packadd! matchit |
9344
33c1b85d408c
commit https://github.com/vim/vim/commit/802a0d902fca423acb15f835d7b09183883d79a0
Christian Brabandt <cb@256bit.org>
parents:
8853
diff
changeset
|
51 endif |