annotate runtime/defaults.vim @ 10011:306f72cd32c2 v7.4.2278

commit https://github.com/vim/vim/commit/4427db9bb2f4b4587559eac18cc7ba10c52c6e8b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 28 14:39:44 2016 +0200 patch 7.4.2278 Problem: New users have no idea of the 'scrolloff' option. Solution: Set 'scrolloff' in defaults.vim.
author Christian Brabandt <cb@256bit.org>
date Sun, 28 Aug 2016 14:45:05 +0200
parents 3fba3e8326a7
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9669
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " The default vimrc file.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 "
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
10011
306f72cd32c2 commit https://github.com/vim/vim/commit/4427db9bb2f4b4587559eac18cc7ba10c52c6e8b
Christian Brabandt <cb@256bit.org>
parents: 9925
diff changeset
4 " Last change: 2016 Aug 28
9669
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 "
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 " This is loaded if no vimrc file was found.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 " Except when Vim is run with "-u NONE" or "-C".
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 " Individual settings can be reverted with ":set option&".
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 " Other commands can be reverted as mentioned below.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 " When started as "evim", evim.vim will already have done these settings.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 if v:progname =~? "evim"
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 finish
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 endif
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 " Use Vim settings, rather than Vi settings (much better!).
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 " This must be first, because it changes other options as a side effect.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 set nocompatible
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 " Allow backspacing over everything in insert mode.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 set backspace=indent,eol,start
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 set history=200 " keep 200 lines of command line history
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 set ruler " show the cursor position all the time
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 set showcmd " display incomplete commands
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 set wildmenu " display completion matches in a status line
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27
9917
8c0b13fe60dc commit https://github.com/vim/vim/commit/e07e797db0c5ef1aafc650d8bb0d39fb052cf1e1
Christian Brabandt <cb@256bit.org>
parents: 9678
diff changeset
28 set ttimeout " time out for key codes
8c0b13fe60dc commit https://github.com/vim/vim/commit/e07e797db0c5ef1aafc650d8bb0d39fb052cf1e1
Christian Brabandt <cb@256bit.org>
parents: 9678
diff changeset
29 set ttimeoutlen=100 " wait up to 100ms after Esc for special key
8c0b13fe60dc commit https://github.com/vim/vim/commit/e07e797db0c5ef1aafc650d8bb0d39fb052cf1e1
Christian Brabandt <cb@256bit.org>
parents: 9678
diff changeset
30
9678
8c9e13109df8 commit https://github.com/vim/vim/commit/b9a46fec3e79d1fc8c406084a41733c647a5e535
Christian Brabandt <cb@256bit.org>
parents: 9669
diff changeset
31 " Show @@@ in the last line if it is truncated.
8c9e13109df8 commit https://github.com/vim/vim/commit/b9a46fec3e79d1fc8c406084a41733c647a5e535
Christian Brabandt <cb@256bit.org>
parents: 9669
diff changeset
32 set display=truncate
8c9e13109df8 commit https://github.com/vim/vim/commit/b9a46fec3e79d1fc8c406084a41733c647a5e535
Christian Brabandt <cb@256bit.org>
parents: 9669
diff changeset
33
10011
306f72cd32c2 commit https://github.com/vim/vim/commit/4427db9bb2f4b4587559eac18cc7ba10c52c6e8b
Christian Brabandt <cb@256bit.org>
parents: 9925
diff changeset
34 " Show a few lines of context around the cursor.
306f72cd32c2 commit https://github.com/vim/vim/commit/4427db9bb2f4b4587559eac18cc7ba10c52c6e8b
Christian Brabandt <cb@256bit.org>
parents: 9925
diff changeset
35 set scrolloff=5
306f72cd32c2 commit https://github.com/vim/vim/commit/4427db9bb2f4b4587559eac18cc7ba10c52c6e8b
Christian Brabandt <cb@256bit.org>
parents: 9925
diff changeset
36
9669
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 " Do incremental searching when it's possible to timeout.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 if has('reltime')
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 set incsearch
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 endif
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 " Do not recognize octal numbers for Ctrl-A and Ctrl-X, most users find it
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 " confusing.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 set nrformats-=octal
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 " For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 if has('win32')
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 set guioptions-=t
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 endif
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 " Don't use Ex mode, use Q for formatting.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 " Revert with ":unmap Q".
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 map Q gq
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55 " CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 " so that you can undo CTRL-U after inserting a line break.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 " Revert with ":iunmap <C-U>".
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 inoremap <C-U> <C-G>u<C-U>
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 " In many terminal emulators the mouse works just fine. By enabling it you
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 " can position the cursor, Visually select and scroll with the mouse.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 if has('mouse')
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63 set mouse=a
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 endif
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 " Switch syntax highlighting on when the terminal has colors or when using the
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 " GUI (which always has colors).
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 if &t_Co > 2 || has("gui_running")
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 " Revert with ":syntax off".
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
70 syntax on
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 " I like highlighting strings inside C comments.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
73 " Revert with ":unlet c_comment_strings".
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
74 let c_comment_strings=1
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
75 endif
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
77 " Only do this part when compiled with support for autocommands.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
78 if has("autocmd")
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
79
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
80 " Enable file type detection.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
81 " Use the default filetype settings, so that mail gets 'tw' set to 72,
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
82 " 'cindent' is on in C files, etc.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83 " Also load indent files, to automatically do language-dependent indenting.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
84 " Revert with ":filetype off".
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
85 filetype plugin indent on
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
86
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
87 " Put these in an autocmd group, so that you can revert them with:
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
88 " ":augroup vimStartup | au! | augroup END"
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
89 augroup vimStartup
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
90 au!
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
91
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
92 " When editing a file, always jump to the last known cursor position.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
93 " Don't do it when the position is invalid or when inside an event handler
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94 " (happens when dropping a file on gvim).
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
95 autocmd BufReadPost *
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
96 \ if line("'\"") >= 1 && line("'\"") <= line("$") |
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
97 \ exe "normal! g`\"" |
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
98 \ endif
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
99
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
100 augroup END
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
101
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
102 endif " has("autocmd")
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
103
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
104 " Convenient command to see the difference between the current buffer and the
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
105 " file it was loaded from, thus the changes you made.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
106 " Only define it when not defined already.
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
107 " Revert with: ":delcommand DiffOrig".
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
108 if !exists(":DiffOrig")
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
109 command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
110 \ | wincmd p | diffthis
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
111 endif
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
112
9925
3fba3e8326a7 commit https://github.com/vim/vim/commit/920694c1b60fac8017b8909efcc24f189804a9bb
Christian Brabandt <cb@256bit.org>
parents: 9917
diff changeset
113 if has('langmap') && exists('+langremap')
9669
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
114 " Prevent that the langmap option applies to characters that result from a
9925
3fba3e8326a7 commit https://github.com/vim/vim/commit/920694c1b60fac8017b8909efcc24f189804a9bb
Christian Brabandt <cb@256bit.org>
parents: 9917
diff changeset
115 " mapping. If set (default), this may break plugins (but it's backward
9669
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
116 " compatible).
9925
3fba3e8326a7 commit https://github.com/vim/vim/commit/920694c1b60fac8017b8909efcc24f189804a9bb
Christian Brabandt <cb@256bit.org>
parents: 9917
diff changeset
117 set nolangremap
9669
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
118 endif