summaryrefslogtreecommitdiffstats
path: root/runtime/defaults.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-03 15:27:20 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-03 15:27:20 +0100
commit314dd79cac2adc10304212d1980d23ecf6782cfc (patch)
tree8295f63e75dc7e7983500435f5b2af061264cb80 /runtime/defaults.vim
parent63d1fea8141c3dfb36aeb9de60e5f1f90450acff (diff)
Update runtime files.
Diffstat (limited to 'runtime/defaults.vim')
-rw-r--r--runtime/defaults.vim51
1 files changed, 23 insertions, 28 deletions
diff --git a/runtime/defaults.vim b/runtime/defaults.vim
index 0dcb922450..b848217cd9 100644
--- a/runtime/defaults.vim
+++ b/runtime/defaults.vim
@@ -1,7 +1,7 @@
" The default vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last change: 2017 Jun 13
+" Last change: 2019 Jan 26
"
" This is loaded if no vimrc file was found.
" Except when Vim is run with "-u NONE" or "-C".
@@ -90,33 +90,28 @@ if &t_Co > 2 || has("gui_running")
let c_comment_strings=1
endif
-" Only do this part when compiled with support for autocommands.
-if has("autocmd")
-
- " Enable file type detection.
- " Use the default filetype settings, so that mail gets 'tw' set to 72,
- " 'cindent' is on in C files, etc.
- " Also load indent files, to automatically do language-dependent indenting.
- " Revert with ":filetype off".
- filetype plugin indent on
-
- " Put these in an autocmd group, so that you can revert them with:
- " ":augroup vimStartup | au! | augroup END"
- augroup vimStartup
- au!
-
- " When editing a file, always jump to the last known cursor position.
- " Don't do it when the position is invalid, when inside an event handler
- " (happens when dropping a file on gvim) and for a commit message (it's
- " likely a different one than last time).
- autocmd BufReadPost *
- \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
- \ | exe "normal! g`\""
- \ | endif
-
- augroup END
-
-endif " has("autocmd")
+" Enable file type detection.
+" Use the default filetype settings, so that mail gets 'tw' set to 72,
+" 'cindent' is on in C files, etc.
+" Also load indent files, to automatically do language-dependent indenting.
+" Revert with ":filetype off".
+filetype plugin indent on
+
+" Put these in an autocmd group, so that you can revert them with:
+" ":augroup vimStartup | au! | augroup END"
+augroup vimStartup
+ au!
+
+ " When editing a file, always jump to the last known cursor position.
+ " Don't do it when the position is invalid, when inside an event handler
+ " (happens when dropping a file on gvim) and for a commit message (it's
+ " likely a different one than last time).
+ autocmd BufReadPost *
+ \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
+ \ | exe "normal! g`\""
+ \ | endif
+
+augroup END
" Convenient command to see the difference between the current buffer and the
" file it was loaded from, thus the changes you made.