aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-01-03 19:57:22 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-01-04 10:32:09 +0100
commit7c4bb23ff38a459911a742657572bc273e528ddf (patch)
tree684e61c5c18b202749496d5a25a4e66d40049261 /runtime
parentdc4a9cbe8564fa430bf600fe0dab5eba3a5e3292 (diff)
downloadrneovim-7c4bb23ff38a459911a742657572bc273e528ddf.tar.gz
rneovim-7c4bb23ff38a459911a742657572bc273e528ddf.tar.bz2
rneovim-7c4bb23ff38a459911a742657572bc273e528ddf.zip
defaults: do :filetype stuff unless explicitly "off"
Until now, the default `:filetype ...` setup was skipped if the user config touched `:filetype` in any way (including implicitly via `:syntax on`). No one needs that, and it's very confusing. Instead, proceed with `:filetype ... on` unless the user explicitly called `:filetype ... off`. closes #7765
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/filetype.txt6
-rw-r--r--runtime/doc/starting.txt9
2 files changed, 6 insertions, 9 deletions
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 78402b47fe..74c453f79a 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -24,10 +24,8 @@ Each time a new or existing file is edited, Vim will try to recognize the type
of the file and set the 'filetype' option. This will trigger the FileType
event, which can be used to set the syntax highlighting, set options, etc.
-Detail: The ":filetype on" command will load one of these files:
- Mac $VIMRUNTIME/filetype.vim
- MS-DOS $VIMRUNTIME\filetype.vim
- Unix $VIMRUNTIME/filetype.vim
+Detail: The ":filetype on" command will load this file:
+ $VIMRUNTIME/filetype.vim
This file is a Vim script that defines autocommands for the
BufNewFile and BufRead events. If the file type is not found by the
name, the file $VIMRUNTIME/scripts.vim is used to detect it from the
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 30c0641ef7..e9188ba641 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -439,15 +439,14 @@ accordingly. Vim proceeds in this order:
:runtime! filetype.vim
:runtime! ftplugin.vim
:runtime! indent.vim
-< This step is skipped if ":filetype ..." was called before now or if
- the "-u NONE" command line argument was given.
+< Skipped if ":filetype … off" was called or if the "-u NONE" command
+ line argument was given.
5. Enable syntax highlighting.
This does the same as the command: >
:runtime! syntax/syntax.vim
-< Note: This enables filetype detection even if ":filetype off" was
- called before now.
- This step is skipped if the "-u NONE" command line argument was given.
+< Skipped if ":syntax off" was called or if the "-u NONE" command
+ line argument was given.
6. Load the plugin scripts. *load-plugins*
This does the same as the command: >