diff options
author | Michael Reed <m.reed@mykolab.com> | 2015-03-23 23:29:21 -0400 |
---|---|---|
committer | Michael Reed <m.reed@mykolab.com> | 2015-03-24 19:33:42 -0400 |
commit | d85fabc24fbb12fef5f597fc56168cbb20daf214 (patch) | |
tree | c01d8a2e201cf4b588016869079e84ccca140c5c | |
parent | adfc8cf50a138a25bbe22f3c6e50ce7bd8c143e7 (diff) | |
download | rneovim-d85fabc24fbb12fef5f597fc56168cbb20daf214.tar.gz rneovim-d85fabc24fbb12fef5f597fc56168cbb20daf214.tar.bz2 rneovim-d85fabc24fbb12fef5f597fc56168cbb20daf214.zip |
doc: Remove refs to 'compatible' and friends
Also remove some MS-DOS references on lines already being touched.
Based on this commit:
https://github.com/justinmk/neovim/commit/e4db01ca8707c34dc808d7f6378aa3aba9002a2d
30 files changed, 45 insertions, 273 deletions
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index db338a2a56..b426799239 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -983,7 +983,6 @@ OPEN *c_CTRL-F* *q:* *q/* *q?* There are two ways to open the command-line window: 1. From Command-line mode, use the key specified with the 'cedit' option. - The default is CTRL-F when 'compatible' is not set. 2. From Normal mode, use the "q:", "q/" or "q?" command. This starts editing an Ex command-line ("q:") or search string ("q/" or "q?"). Note that this is not possible while recording is in progress (the diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 6e6feb32d6..493517f908 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -135,10 +135,9 @@ VIM IS... FLEXIBLE *design-flexible* Vim should make it easy for users to work in their preferred styles rather than coercing its users into particular patterns of work. This can be for -items with a large impact (e.g., the 'compatible' option) or for details. The -defaults are carefully chosen such that most users will enjoy using Vim as it -is. Commands and options can be used to adjust Vim to the desire of the user -and its environment. +items with a large impact or for details. The defaults are carefully chosen +such that most users will enjoy using Vim as it is. Commands and options can +be used to adjust Vim to the desire of the user and its environment. VIM IS... NOT *design-not* diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 6b89529bfe..5df868044f 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -28,10 +28,6 @@ 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. -NOTE: Filetypes and 'compatible' don't work together well, since being Vi -compatible means options are global. Resetting 'compatible' is recommended, -if you didn't do that already. - Detail: The ":filetype on" command will load one of these files: Mac $VIMRUNTIME/filetype.vim MS-DOS $VIMRUNTIME\filetype.vim diff --git a/runtime/doc/ft_sql.txt b/runtime/doc/ft_sql.txt index 72ea3ed366..2c9c1571d3 100644 --- a/runtime/doc/ft_sql.txt +++ b/runtime/doc/ft_sql.txt @@ -238,9 +238,8 @@ buffer basis, at any time. The ftplugin/sql.vim file defines this function: > SQLSetType Executing this function without any parameters will set the indent and syntax -scripts back to their defaults, see |sql-type-default|. If you have turned -off Vi's compatibility mode, |'compatible'|, you can use the <Tab> key to -complete the optional parameter. +scripts back to their defaults, see |sql-type-default|. You can use the <Tab> +key to complete the optional parameter. After typing the function name and a space, you can use the completion to supply a parameter. The function takes the name of the Vim script you want to diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index adea92079f..cfa9dc8795 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -195,7 +195,7 @@ characters are hidden. That makes it easier to read a command. Anyway, you can use CTRL-] on any word, also when it is not within |, and Vim will try to find help for it. Especially for options in single quotes, e.g. -'compatible'. +'hlsearch'. ------------------------------------------------------------------------------ vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl: diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 2b6c24cecf..b6c719095c 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -499,10 +499,6 @@ the ":map" command. The rules are: <M-A> Meta- A ('A' with bit 8 set) <t_kd> "kd" termcap entry (cursor down key) -If you want to use the full <> notation in Vim, you have to make sure the '<' -flag is excluded from 'cpoptions' (when 'compatible' is not set, it already is -by default). > - :set cpo-=< The <> notation uses <lt> to escape the special meaning of key names. Using a backslash also works, but only when 'cpoptions' does not include the 'B' flag. diff --git a/runtime/doc/job_control.txt b/runtime/doc/job_control.txt index 2521132047..1faf9bcd94 100644 --- a/runtime/doc/job_control.txt +++ b/runtime/doc/job_control.txt @@ -52,7 +52,6 @@ Job control is achieved by calling a combination of the |jobstart()|, |jobsend()| and |jobstop()| functions, and by listening to the |JobActivity| event. The best way to understand is with a complete example: > - set nocp let job1 = jobstart('shell1', 'bash') let job2 = jobstart('shell2', 'bash', ['-c', 'for ((i = 0; i < 10; i++)); do echo hello $i!; sleep 1; done']) diff --git a/runtime/doc/manpages/de/vim-de.1 b/runtime/doc/manpages/de/vim-de.1 index 1b718e56ea..50dd0ce7e6 100644 --- a/runtime/doc/manpages/de/vim-de.1 +++ b/runtime/doc/manpages/de/vim-de.1 @@ -117,10 +117,6 @@ b Binärer Modus: Es werden einige Variablen gesetzt, sodass es möglich ist, eine binäre oder ausführbare Datei zu bearbeiten. .TP -\-C -Kompatibel: Setzt die Option 'compatible'. Das macht \fBVim\fP im Verhalten -sehr ähnlich zu Vi, selbst wenn eine VimRC\-Datei existiert. -.TP \-d Startet im diff\-Modus. Es sollten zwei, drei oder vier Dateinamen als Parameter übergeben werden. \fBVim\fP öffnet sie alle und zeigt die @@ -192,11 +188,6 @@ geschrieben werden können. Man beachte, dass diese Optionen ('modifiable', \&'write') dennnoch nachträglich zum Erlauben von Änderungen gesetzt werden können. .TP -\-N -Nicht\-kompatibler Modus: Löscht die Option 'compatible'. Dies veranlasst -\fBVim\fP, sich ein wenig besser, aber weniger Vi\-kompatibel zu verhalten, -selbst wenn es keine VimRC\-Datei gibt. -.TP \-n Verwendet keine Auslagerungsdatei: Eine Wiederherstellung nach einem Absturz ist nicht möglich. Auf einem langsamen Medium (Diskette) kann diese diff --git a/runtime/doc/manpages/fr/vim-fr.1 b/runtime/doc/manpages/fr/vim-fr.1 index 6a864e070d..a794a814dd 100644 --- a/runtime/doc/manpages/fr/vim-fr.1 +++ b/runtime/doc/manpages/fr/vim-fr.1 @@ -142,11 +142,6 @@ Mode Binaire. Active plusieurs options pour permettre l'édition d'un fichier binaire ou exécutable. .TP -\-C -Compatible. Active l'option 'compatible'. -.B Vim -se comportera alors quasiment comme Vi, même s'il existe un fichier .vimrc. -.TP \-d Démarre en mode Diff. Deux, trois ou quatre noms de fichiers doivent être spécifiés. @@ -248,13 +243,6 @@ désactivées, de sorte que les changements ne sont pas autorisés et que les fichiers ne peuvent pas être écrits. Note : ces options peuvent être activées pour autoriser les modifications. .TP -\-N -Mode Non-compatible. Désactive l'option 'compatible'. -Cela améliorera le comportement de -.B Vim -\, mais il sera moins conforme à celui de Vi, même s'il n'existe aucun -fichier ".vimrc". -.TP \-n N'utilise pas de fichier d'échange (swapfile). Le recouvrement après un plantage sera impossible. diff --git a/runtime/doc/manpages/it/vim-it.1 b/runtime/doc/manpages/it/vim-it.1 index d252b4dada..1bee867e2a 100644 --- a/runtime/doc/manpages/it/vim-it.1 +++ b/runtime/doc/manpages/it/vim-it.1 @@ -136,13 +136,6 @@ Modo Binary (binario). Vengono impostate alcune opzioni che permettono di modificare un file binario o un programma eseguibile. .TP -\-C -Compatibile. Imposta l'opzione 'compatible'. -In questo modo -.B Vim -ha quasi lo stesso comportamento di Vi, anche in presenza di un file -di configurazione .vimrc [proprio di Vim, vi usa .exrc \- Ndt]. -.TP \-d Inizia in Modo Diff [differenze]. Dovrebbero esserci come argomenti due o tre o quattro nomi di file. @@ -240,13 +233,6 @@ Modifiche non permesse. Le opzioni 'modifiable' e 'write' sono annullate, in modo da impedire sia modifiche che riscritture. Da notare che queste opzioni possono essere abilitate in seguito, permettendo così modifiche. .TP -\-N -Modo "Non-compatibile". Annulla l'opzione 'compatible'. -Così -.B Vim -va un po' meglio, ma è meno compatibile con Vi, anche in assenza di un -file .vimrc. -.TP \-n Inibisce l'uso di un file di swap. Il recupero dopo una caduta di macchina diventa impossibile. diff --git a/runtime/doc/manpages/ja/vim-ja.1 b/runtime/doc/manpages/ja/vim-ja.1 index 622caf0587..ad5f24d53a 100644 --- a/runtime/doc/manpages/ja/vim-ja.1 +++ b/runtime/doc/manpages/ja/vim-ja.1 @@ -114,12 +114,6 @@ Note: "+" と "\-c" は合わせて 10 個まで指定できます。 バイナリモード。 バイナリファイルを編集ためのオプションがいくつか設定されます。 .TP -\-C -互換モード。'compatible' オプションがオンになります。 - .vimrc ファイルの有無に関わらず、 -.B Vim -の動作が Vi 互換になります。 -.TP \-d 差分モードで起動します。 二つか三つの四つのファイルを引数に指定してください。 @@ -192,12 +186,6 @@ lisp モード。 ファイルの変更と保存ができなくなります。 Note: それらのオプションを設定すれば変更できるようになります。 .TP -\-N -非互換モード。'compatible' オプションがオフになります。 - .vimrc ファイルの有無に関わらず、 -.B Vim -の改良された機能が有効になります。Vi との互換性が少し失われます。 -.TP \-n スワップファイルを使用しません。 クラッシュしてもリカバリできなくなります。 diff --git a/runtime/doc/manpages/pl/vim-pl.1 b/runtime/doc/manpages/pl/vim-pl.1 index 6f2ea1e117..0f4128d8bd 100644 --- a/runtime/doc/manpages/pl/vim-pl.1 +++ b/runtime/doc/manpages/pl/vim-pl.1 @@ -133,12 +133,6 @@ Tryb binarny. Ustawi się kilka opcji, które umożliwią edycję plików binarnych lub wykonywalnych. .TP -\-C -Kompatybilny. Ustawia opcję 'compatible'. -W ten sposób -.B Vim -będzie zachowywał się jak Vi, nawet jeśli istnieje plik .vimrc. -.TP \-d Uruchom w trybie diff. Powinno się użyć dwóch, trzech lub czterech nazwy plików jako argumentów. @@ -236,12 +230,6 @@ Opcje 'modifiable' i 'write' zostaną wyłączone, tak więc zmiany w pliku oraz ich zapisanie nie są możliwe. Wartość tych opcji można zmienić. .TP -\-N -Tryb niekompatybilny. Przestawia opcję 'compatible'. Dzięki temu -.B Vim -będzie zachowywał się odrobinę lepiej, ale mniej zgodnie z Vi nawet -jeśli nie istnieje plik .vimrc. -.TP \-n Nie powstanie plik wymiany. Odzyskanie pliku po wypadku nie będzie możliwe. diff --git a/runtime/doc/manpages/ru/vim-ru.1 b/runtime/doc/manpages/ru/vim-ru.1 index 34ab3e2b21..1d4221b3ab 100644 --- a/runtime/doc/manpages/ru/vim-ru.1 +++ b/runtime/doc/manpages/ru/vim-ru.1 @@ -124,11 +124,6 @@ vim \- Vi IMproved (Улучшенный Vi), текстовый редакто Производится настройка некоторых опций, делающих возможной правку двоичного или исполняемого файла. .TP -\-C -Режим совместимости. Включает опцию 'compatible'. -.B Vim -будет работать почти как Vi, даже если существует файл .vimrc. -.TP \-d Режим поиска различий. Должно быть указано два или три имени файла. @@ -210,12 +205,6 @@ vim \- Vi IMproved (Улучшенный Vi), текстовый редакто Изменение файлов запрещено. При этом отключается опция 'write', поэтому запись файлов становится невозможной. .TP -\-N -Режим неполной совместимости. Отключается 'compatible'. -.B Vim -будет работать лучше, но не будет полностью совместим с Vi, даже если -отсутствует файл сценария настроек (.vimrc). -.TP \-n Не использовать своп-файл. Восстановление при сбое в работе будет невозможно. Удобно для правки файла на очень медленном носителе (например, гибком диске). diff --git a/runtime/doc/manpages/vim.1 b/runtime/doc/manpages/vim.1 index c679068a69..da3d77abfe 100644 --- a/runtime/doc/manpages/vim.1 +++ b/runtime/doc/manpages/vim.1 @@ -131,12 +131,6 @@ Binary mode. A few options will be set that makes it possible to edit a binary or executable file. .TP -\-C -Compatible. Set the 'compatible' option. -This will make -.B Vim -behave mostly like Vi, even though a .vimrc file exists. -.TP \-d Start in diff mode. There should be two, three, or four file name arguments. @@ -223,13 +217,6 @@ Modifications not allowed. The 'modifiable' and 'write' options will be unset, so that changes are not allowed and files can not be written. Note that these options can be set to enable making modifications. .TP -\-N -No-compatible mode. Reset the 'compatible' option. -This will make -.B Vim -behave a bit better, but less Vi compatible, even though a .vimrc file does -not exist. -.TP \-n No swap file will be used. Recovery after a crash will be impossible. diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index 9365f39b2a..70f20a155b 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -687,7 +687,6 @@ and |+X11| features. A command line started with a backslash or the range of a command contained a backslash in a wrong place. This is often caused by command-line continuation being disabled. Remove the 'C' flag from the 'cpoptions' option to enable it. -Or use ":set nocp". *E471* > Argument required @@ -770,11 +769,10 @@ and the screen is about to be redrawn: key being used otherwise. -> Press ':' or any other Normal mode command character to start that command. -> Press 'k', <Up>, 'u', 'b' or 'g' to scroll back in the messages. This - works the same way as at the |more-prompt|. Only works when 'compatible' - is off and 'more' is on. + works the same way as at the |more-prompt|. Only works when 'more' is on. -> Pressing 'j', 'f', 'd' or <Down> is ignored when messages scrolled off the - top of the screen, 'compatible' is off and 'more' is on, to avoid that - typing one 'j' or 'f' too many causes the messages to disappear. + top of the screen and 'more' is on, to avoid that typing one 'j' or 'f' too + many causes the messages to disappear. -> Press <C-Y> to copy (yank) a modeless selection to the clipboard register. -> Use a menu. The characters defined for Cmdline-mode are used. -> When 'mouse' contains the 'r' flag, clicking the left mouse button works diff --git a/runtime/doc/os_mac.txt b/runtime/doc/os_mac.txt index 67790f1dea..3eebb7ef0d 100644 --- a/runtime/doc/os_mac.txt +++ b/runtime/doc/os_mac.txt @@ -67,9 +67,7 @@ default command-key mappings. On older systems files starting with a dot "." are discouraged, thus the rc files are named "vimrc" or "_vimrc" and "gvimrc" or "_gvimrc". These files -can be in any format (mac, dos or unix). Vim can handle any file format when -the |'nocompatible'| option is set, otherwise it will only handle mac format -files. +can be in any format (mac, dos or unix). ============================================================================== 3. Mac FAQ *mac-faq* diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 5e5b0d4fa5..4425caa9bb 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -644,7 +644,6 @@ Short explanation of each option: *option-list* 'columns' 'co' number of columns in the display 'comments' 'com' patterns that can start a comment line 'commentstring' 'cms' template for comments; used for fold marker -'compatible' 'cp' behave Vi-compatible as much as possible 'complete' 'cpt' specify how Insert mode completion works 'completefunc' 'cfu' function to be used for Insert mode completion 'completeopt' 'cot' options for Insert mode completion @@ -1137,8 +1136,6 @@ Context-sensitive completion on the command-line: |-F| -F Farsi mode ('fkmap' and 'rightleft' are set) |-H| -H Hebrew mode ('hkmap' and 'rightleft' are set) |-V| -V Verbose, give informative messages -|-C| -C Compatible, set the 'compatible' option -|-N| -N Nocompatible, reset the 'compatible' option |-r| -r give list of swap files |-r| -r {file} .. recover aborted edit session |-n| -n do not create a swap file diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index a8e573a52e..9cf445f361 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -134,8 +134,7 @@ q Stops recording. (Implementation note: The 'q' that not have a <CR> it will be added automatically when the 'e' flag is present in 'cpoptions'. Note that the ":*" command is only recognized when the - '*' flag is present in 'cpoptions'. This is NOT the - default when 'nocompatible' is used. + '*' flag is present in 'cpoptions'. For ":@=" the last used expression is used. The result of evaluating the expression is executed as an Ex command. diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index c60bf40528..a18571b77f 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -292,24 +292,6 @@ argument. {not available when compiled without the |+eval| feature} {not in Vi} - *-C* --C Compatible mode. Sets the 'compatible' option. You can use - this to get 'compatible', even though a .vimrc file exists. - Keep in mind that the command ":set nocompatible" in some - plugin or startup script overrules this, so you may end up - with 'nocompatible' anyway. To find out, use: > - :verbose set compatible? -< Several plugins won't work with 'compatible' set. You may - want to set it after startup this way: > - vim "+set cp" filename -< Also see |compatible-default|. {not in Vi} - - *-N* --N Not compatible mode. Resets the 'compatible' option. You can - use this to get 'nocompatible', when there is no .vimrc file - or when using "-u NONE". - Also see |compatible-default|. {not in Vi} - *-n* -n No swap file will be used. Recovery after a crash will be impossible. Handy if you want to view or edit a file on a @@ -374,9 +356,6 @@ argument. starts. Loading plugins is also skipped. When {vimrc} is equal to "NORC" (all uppercase), this has the same effect as "NONE", but loading plugins is not skipped. - Using the "-u" argument has the side effect that the - 'compatible' option will be on by default. This can have - unexpected effects. See |'compatible'|. {not in Vi} *-U* *E230* @@ -512,8 +491,6 @@ X11 GUI support. See |gui-resources|. ============================================================================== 3. Initialization *initialization* *startup* -This section is about the non-GUI version of Vim. - At startup, Vim checks environment variables and files and sets values accordingly. Vim proceeds in this order: @@ -566,9 +543,6 @@ accordingly. Vim proceeds in this order: a. For Unix, MS-DOS, MS-Windows, and Macintosh, the system vimrc file is read for initializations. The path of this file is shown with the ":version" command. Mostly it's "$VIM/vimrc". - Note that this file is ALWAYS read in 'compatible' mode, since the - automatic resetting of 'compatible' is only done later. Add a ":set - nocp" command if you like. For the Macintosh the $VIMRUNTIME/macmap.vim is read. *VIMINIT* *.vimrc* *_vimrc* *EXINIT* *.exrc* *_exrc* *$MYVIMRC* @@ -576,14 +550,14 @@ accordingly. Vim proceeds in this order: is used, the others are ignored. The $MYVIMRC environment variable is set to the file that was first found, unless $MYVIMRC was already set and when using VIMINIT. - - The environment variable VIMINIT (see also |compatible-default|) (*) + - The environment variable VIMINIT The value of $VIMINIT is used as an Ex command line. - The user vimrc file(s): - "$HOME/.vimrc" (for Unix) (*) - "$HOME/.vim/vimrc" (for Unix) (*) - "$HOME/_vimrc" (for MS-DOS and Win32) (*) - "$HOME/vimfiles/vimrc" (for MS-DOS and Win32) (*) - "$VIM/_vimrc" (for MS-DOS and Win32) (*) + "$HOME/.vimrc" (for Unix) + "$HOME/.vim/vimrc" (for Unix) + "$HOME/_vimrc" (for Win32) + "$HOME/vimfiles/vimrc" (for Win32) + "$VIM/_vimrc" (for Win32) Note: For Unix, when ".vimrc" does not exist, "_vimrc" is also tried, in case an MS-DOS compatible file system is used. For MS-DOS and Win32 ".vimrc" is checked @@ -595,20 +569,17 @@ accordingly. Vim proceeds in this order: The value of $EXINIT is used as an Ex command line. - The user exrc file(s). Same as for the user vimrc file, but with "vimrc" replaced by "exrc". But only one of ".exrc" and "_exrc" is - used, depending on the system. And without the (*)! + used, depending on the system. c. If the 'exrc' option is on (which is not the default), the current directory is searched for three files. The first that exists is used, the others are ignored. - - The file ".vimrc" (for Unix) (*) - "_vimrc" (for MS-DOS and Win32) (*) - - The file "_vimrc" (for Unix) (*) - ".vimrc" (for MS-DOS and Win32) (*) + - The file ".vimrc" (for Unix) + "_vimrc" (for Win32) + - The file "_vimrc" (for Unix) + ".vimrc" (for Win32) - The file ".exrc" (for Unix) - "_exrc" (for MS-DOS and Win32) - - (*) Using this file or environment variable will cause 'compatible' to be - off by default. See |compatible-default|. + "_exrc" (for Win32) 4. Load the plugin scripts. *load-plugins* This does the same as the command: > @@ -673,8 +644,6 @@ Create a vimrc file to set the default settings and mappings for all your edit sessions. Put it in a place so that it will be found by 3b: ~/.vimrc (Unix) $VIM\_vimrc (MS-DOS and Win32) -Note that creating a vimrc file will cause the 'compatible' option to be off -by default. See |compatible-default|. Local setup: Put all commands that you need for editing a specific directory only into a @@ -703,35 +672,8 @@ the vimrc files have <CR> <NL> pairs as line separators. This will give problems if you have a file with only <NL>s and have a line like ":map xx yy^M". The trailing ^M will be ignored. - *compatible-default* -When Vim starts, the 'compatible' option is on. This will be used when Vim -starts its initializations. But as soon as a user vimrc file is found, or a -vimrc file in the current directory, or the "VIMINIT" environment variable is -set, it will be set to 'nocompatible'. This has the side effect of setting or -resetting other options (see 'compatible'). But only the options that have -not been set or reset will be changed. This has the same effect like the -value of 'compatible' had this value when starting Vim. Note that this -doesn't happen for the system-wide vimrc file nor when Vim was started with -the |-u| command line argument. It does also happen for gvimrc files. The -$MYVIMRC or $MYGVIMRC file will be set to the first found vimrc and/or gvimrc -file. - -But there is a side effect of setting or resetting 'compatible' at the moment -a .vimrc file is found: Mappings are interpreted the moment they are -encountered. This makes a difference when using things like "<CR>". If the -mappings depend on a certain value of 'compatible', set or reset it before -giving the mapping. - -The above behavior can be overridden in these ways: -- If the "-N" command line argument is given, 'nocompatible' will be used, - even when no vimrc file exists. -- If the "-C" command line argument is given, 'compatible' will be used, even - when a vimrc file exists. -- If the "-u {vimrc}" argument is used, 'compatible' will be used. -- When the name of the executable ends in "ex", then this works like the "-C" - argument was given: 'compatible' will be used, even when a vimrc file - exists. This has been done to make Vim behave like "ex", when it is started - as "ex". +The $MYVIMRC or $MYGVIMRC file will be set to the first found vimrc and/or +gvimrc file. Avoiding trojan horses: *trojan-horse* While reading the "vimrc" or the "exrc" file in the current directory, some @@ -952,11 +894,6 @@ these steps: < [<C-R> is a CTRL-R, <CR> is a return, <Esc> is the escape key] You need to escape special characters, esp. spaces. -Note that when you create a .vimrc file, this can influence the 'compatible' -option, which has several side effects. See |'compatible'|. -":mkvimrc", ":mkexrc" and ":mksession" write the command to set or reset the -'compatible' option to the output file first, because of these side effects. - ============================================================================== 7. Views and Sessions *views-sessions* diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 7fc621e706..214a7de6f4 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -3960,7 +3960,7 @@ See |pattern| for the explanation of what a pattern is. Syntax patterns are always interpreted like the 'magic' option is set, no matter what the actual value of 'magic' is. And the patterns are interpreted like the 'l' flag is not included in 'cpoptions'. This was done to make syntax files portable and -independent of 'compatible' and 'magic' settings. +independent of the 'magic' setting. Try to avoid patterns that can match an empty string, such as "[a-z]*". This slows down the highlighting a lot, because it matches everywhere. diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 6f35118fa8..2e843bed63 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1624,9 +1624,6 @@ Can this be avoided? (Thomas Waba, 2008 Aug 24) Also for ":w" without a file name. The buffer has the full path in ffname, should pass this to the autocommand. -"vim -C" often has 'nocompatible', because it's set in some startup script. -Set 'compatible' after startup is done? Patch by James Vega, 2008 Feb 7. - input() completion should not insert a backslash to escape a space in a file name? @@ -1821,9 +1818,6 @@ differently and unexpectedly. Caused by patch 7.2.398? The magic clipboard format "VimClipboard2" appears in several places. Should be only one. -"vim -C" often has 'nocompatible', because it's set somewhere in a startup -script. Do "set compatible" after startup? - It's difficult to debug numbered functions (function in a Dictionary). Print the function name before resolving it to a number? let d = {} diff --git a/runtime/doc/usr_01.txt b/runtime/doc/usr_01.txt index c7b1910358..c21c7b1fbe 100644 --- a/runtime/doc/usr_01.txt +++ b/runtime/doc/usr_01.txt @@ -61,13 +61,10 @@ Most of the manuals assume that Vim has been properly installed. If you didn't do that yet, or if Vim doesn't run properly (e.g., files can't be found or in the GUI the menus do not show up) first read the chapter on installation: |usr_90.txt|. - *not-compatible* -The manuals often assume you are using Vim with Vi-compatibility switched -off. For most commands this doesn't matter, but sometimes it is important, -e.g., for multi-level undo. An easy way to make sure you are using a nice -setup is to copy the example vimrc file. By doing this inside Vim you don't -have to check out where it is located. How to do this depends on the system -you are using: + + *setup-vimrc_example* +It's not required for this tutorial, but we provide an example vimrc you may +use: Unix: > :!cp -i $VIMRUNTIME/vimrc_example.vim ~/.vimrc @@ -76,23 +73,7 @@ MS-DOS, MS-Windows: > If the file already exists you probably want to keep it. -If you start Vim now, the 'compatible' option should be off. You can check it -with this command: > - - :set compatible? - -If it responds with "nocompatible" you are doing well. If the response is -"compatible" you are in trouble. You will have to find out why the option is -still set. Perhaps the file you wrote above is not found. Use this command -to find out: > - - :scriptnames - -If your file is not in the list, check its location and name. If it is in the -list, there must be some other place where the 'compatible' option is switched -back on. - -For more info see |vimrc| and |compatible-default|. +For more info see |vimrc|. ============================================================================== *01.3* Using the Vim tutor *tutor* *vimtutor* @@ -133,7 +114,7 @@ filename. For French: < 2. Edit the copied file with Vim: > - vim -u NONE -c "set nocp" TUTORCOPY + vim -u NONE TUTORCOPY < The extra arguments make sure Vim is started in a good mood. diff --git a/runtime/doc/usr_02.txt b/runtime/doc/usr_02.txt index 8bfa9ba05d..ebb918d7ec 100644 --- a/runtime/doc/usr_02.txt +++ b/runtime/doc/usr_02.txt @@ -267,15 +267,6 @@ The next u command gives you the u, and so on: young intelligent turtle ~ A young intelligent turtle ~ - Note: - If you type "u" twice, and the result is that you get the same text - back, you have Vim configured to work Vi compatible. Look here to fix - this: |not-compatible|. - This text assumes you work "The Vim Way". You might prefer to use - the good old Vi way, but you will have to watch out for small - differences in the text then. - - REDO If you undo too many times, you can press CTRL-R (redo) to reverse the diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt index 18a1f23e9f..4ed9f35840 100644 --- a/runtime/doc/usr_03.txt +++ b/runtime/doc/usr_03.txt @@ -467,13 +467,8 @@ thus searching wraps around the end of the file. INTERMEZZO If you like one of the options mentioned before, and set it each time you use -Vim, you can put the command in your Vim startup file. - Edit the file, as mentioned at |not-compatible|. Or use this command to -find out where it is: > - - :scriptnames - -Edit the file, for example with: > +Vim, you can put the command in your Vim startup file. Edit the file, for +example with: > :edit ~/.vimrc diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index e16dee2fb9..43a0d58b26 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -62,9 +62,8 @@ to write a Vim script file: |usr_41.txt|. ============================================================================== *05.2* The example vimrc file explained *vimrc_example.vim* -In the first chapter was explained how the example vimrc (included in the -Vim distribution) file can be used to make Vim startup in not-compatible mode -(see |not-compatible|). The file can be found here: +In the first chapter was explained how the example vimrc file can be used. +The file can be found here: $VIMRUNTIME/vimrc_example.vim ~ @@ -73,13 +72,6 @@ will give you hints about how to set up your own preferences. Not everything will be explained though. Use the ":help" command to find out more. > - set nocompatible - -As mentioned in the first chapter, these manuals explain Vim working in an -improved way, thus not completely Vi compatible. Setting the 'compatible' -option off, thus 'nocompatible' takes care of this. - -> set backspace=indent,eol,start This specifies where in Insert mode the <BS> is allowed to delete the diff --git a/runtime/doc/usr_90.txt b/runtime/doc/usr_90.txt index ab0b8156f8..90ae3e3b23 100644 --- a/runtime/doc/usr_90.txt +++ b/runtime/doc/usr_90.txt @@ -167,10 +167,6 @@ startup: > vim -V -Don't forget that the user manual assumes you Vim in a certain way. After -installing Vim, follow the instructions at |not-compatible| to make Vim work -as assumed in this manual. - SELECTING FEATURES @@ -393,7 +389,7 @@ for something named "Vim-enhanced-version.rpm" and install that. Q: How Do I Turn Syntax Coloring On? How do I make plugins work? Use the example vimrc script. You can find an explanation on how to use it -here: |not-compatible|. +here: |setup-vimrc_example|. See chapter 6 for information about syntax highlighting: |usr_06.txt|. diff --git a/runtime/vimrc_example.vim b/runtime/vimrc_example.vim index 7d64d99bf7..cd944155f2 100644 --- a/runtime/vimrc_example.vim +++ b/runtime/vimrc_example.vim @@ -7,10 +7,6 @@ " for Unix: ~/.vimrc " for MS-DOS and Win32: $VIM\_vimrc -" Use Vim settings, rather than Vi settings (much better!). -" This must be first, because it changes other options as a side effect. -set nocompatible - " allow backspacing over everything in insert mode set backspace=indent,eol,start diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index 07d63c9be5..cd1b066fdd 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -2335,7 +2335,7 @@ do_source ( /* * The file exists. * - In verbose mode, give a message. - * - For a vimrc file, may want to set 'compatible', call vimrc_found(). + * - For a vimrc file, may want to call vimrc_found(). */ if (p_verbose > 1) { verbose_enter(); diff --git a/src/nvim/option.c b/src/nvim/option.c index db49f6ba1c..016a50fb62 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -26,8 +26,6 @@ * - Add an entry in runtime/optwin.vim. * When making changes: * - Adjust the help for the option in doc/option.txt. - * - When an entry has the P_VIM flag, or is lacking the P_VI_DEF flag, add a - * comment at the help for the 'compatible' option. */ #define IN_OPTION_C @@ -334,7 +332,7 @@ typedef struct vimoption { #define P_WAS_SET 0x100U /* option has been set/reset */ #define P_NO_MKRC 0x200U /* don't include in :mkvimrc output */ #define P_VI_DEF 0x400U /* Use Vi default for Vim */ -#define P_VIM 0x800U /* Vim option, reset when 'cp' set */ +#define P_VIM 0x800U /* Vim option */ /* when option changed, what to display: */ #define P_RSTAT 0x1000U /* redraw status lines */ @@ -2010,8 +2008,7 @@ void set_init_1(void) || enc_utf8 ) { /* Adjust the default for 'isprint' and 'iskeyword' to match - * latin1. Also set the defaults for when 'nocompatible' is - * set. */ + * latin1. */ set_string_option_direct((char_u *)"isp", -1, ISP_LATIN1, OPT_FREE, SID_NONE); set_string_option_direct((char_u *)"isk", -1, @@ -7416,14 +7413,10 @@ static void paste_option_changed(void) old_p_paste = p_paste; } -/* - * vimrc_found() - Called when a ".vimrc" or "VIMINIT" has been found. - * - * Reset 'compatible' and set the values for options that didn't get set yet - * to the Vim defaults. - * Don't do this if the 'compatible' option has been set or reset before. - * When "fname" is not NULL, use it to set $"envname" when it wasn't set yet. - */ +/// vimrc_found() - Called when a ".vimrc" or "VIMINIT" has been found. +/// +/// Set the values for options that didn't get set yet to the Vim defaults. +/// When "fname" is not NULL, use it to set $"envname" when it wasn't set yet. void vimrc_found(char_u *fname, char_u *envname) { bool dofree = false; diff --git a/src/nvim/testdir/dotest.in b/src/nvim/testdir/dotest.in index b495f674f8..2ef4576f4e 100644 --- a/src/nvim/testdir/dotest.in +++ b/src/nvim/testdir/dotest.in @@ -1,3 +1,3 @@ -:set nocp nomore +:set nomore :map dotest /^STARTTEST
j:set ff=unix cpo-=A
:.,/ENDTEST/-1w! Xdotest
:set ff& cpo+=A
nj0:so! Xdotest
dotest dotest |