Merge #2236 'docs cleanup'

This commit is contained in:
Justin M. Keyes 2015-03-24 19:53:31 -04:00
commit c56c035576
42 changed files with 74 additions and 380 deletions

View File

@ -197,7 +197,7 @@ endfunc
function! spellfile#WritableSpellDir()
if has("unix")
" For Unix always use the $HOME/.vim directory
" For Unix always use the $HOME/.nvim directory
return $HOME . "/.nvim/spell"
endif
for dir in split(&rtp, ',')

View File

@ -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

View File

@ -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*

View File

@ -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

View File

@ -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

View File

@ -158,9 +158,6 @@ framework, most notably iBus, have been known to produce undesirable results
in gVim. These may include an inability to enter spaces, or long delays
between typing a character and it being recognized by the application.
One workaround that has been successful, for unknown reasons, is to prevent
gvim from forking into the background by starting it with the |-f| argument.
==============================================================================
2. Scrollbars *gui-scrollbars*

View File

@ -40,25 +40,6 @@ The "-f" option runs Vim in the foreground.
The "-b" option runs Vim in the background (this is the default).
Also see |++opt| and |+cmd|.
*gui-fork*
When the GUI is started, it does a fork() and exits the current process.
When gvim was started from a shell this makes the shell accept further
commands. If you don't want this (e.g. when using gvim for a mail program
that waits for gvim to exit), start gvim with "gvim -f", "vim -gf" or use
":gui -f". Don't use "vim -fg", because "-fg" specifies the foreground
color.
When using "gvim -f" and then ":gui", Vim will run in the foreground. The
"-f" argument will be remembered. To force running Vim in the background use
":gui -b".
"gvim --nofork" does the same as "gvim -f".
*E851* *E852*
When starting the GUI fails Vim will try to continue running in the terminal.
If you want the GUI to run in the foreground always, include the 'f'
flag in 'guioptions'. |-f|.
==============================================================================
2. GUI Resources *gui-resources* *.Xdefaults*

View File

@ -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:

View File

@ -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.

View File

@ -37,11 +37,21 @@ for details
==============================================================================
2. Usage *job-control-usage*
Here's a quick one-liner that creates a job which invokes the "ls" shell
command and prints the result:
>
call jobstart('', 'ls', ['-a'])|au JobActivity * echo v:job_data|au!
JobActivity
In the one-liner above, creating the JobActivity event handler immediately
after the call to jobstart() is not a race because the Nvim job system will
not publish the job result (even though it may receive it) until evaluation of
the chained user commands (`expr1|expr2|...|exprN`) has completed.
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'])
@ -72,7 +82,7 @@ Here's what is happening:
- The second shell is started with the -c argument, causing it to execute a
command then exit. In this case, the command is a for loop that will print 0
through 9 then exit.
- The |JobHandler()| function is called by the `JobActivity` autocommand (notice
- The `JobHandler()` function is called by the `JobActivity` autocommand (notice
how the shell* pattern matches the names `shell1` and `shell2` passed to
|jobstart()|), and it takes care of displaying stdout/stderr received from
the shells.

View File

@ -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
@ -148,10 +144,6 @@ kein neues Fenster geöffnet. Dieser Parameter wird benutzt, damit das
aufrufende Programm auf das Beenden des Bearbeitungssitzung wartet (z.B.:
mail). Bei AmigaOS funktionieren die Befehle »:sh« und „:!« nicht.
.TP
\-\-nofork
Vordergrund: Bei der GUI\-Version erzeugt \fBVim\fP keinen neuen Prozess und
löst sich nicht von der Shell, in der er aufgerufen wurde.
.TP
\-F
Wenn \fBVim\fP mit FKMAP\-Unterstützung für das Schreiben von rechts nach links
und Farsi\-Tastatur\-Belegung kompiliert wurde, startet Vim im Farsi\-Modus,
@ -196,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

View File

@ -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.
@ -186,11 +181,6 @@ est exécuté par un programme qui attend la fin de la session d'édition
(par exemple mail).
Sur Amiga, les commandes ":sh" et ":!" ne fonctionneront pas.
.TP
\-\-nofork
Premier-plan (Foreground). Pour la version graphique,
.B Vim
ne forkera pas et ne se détachera pas du shell dans lequel il a été lancé.
.TP
\-F
Si
.B Vim
@ -253,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.

View File

@ -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.
@ -182,11 +175,6 @@ Opzione da usare quando
sessione di edit (ad es. mail).
Sull'Amiga i comandi ":sh" e ":!" non sono disponibili.
.TP
\-\-nofork
Direttamente [Foreground]. Per la versione GUI,
.B Vim
non crea [fork] una nuova finestra, indipendente dalla shell di invocazione.
.TP
\-F
Se
.B Vim
@ -245,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.

View File

@ -114,12 +114,6 @@ Note: "+" と "\-c" は合わせて 10 個まで指定できます。
バイナリモード。
バイナリファイルを編集ためのオプションがいくつか設定されます。
.TP
\-C
互換モード。'compatible' オプションがオンになります。
.vimrc ファイルの有無に関わらず、
.B Vim
の動作が Vi 互換になります。
.TP
\-d
差分モードで起動します。
二つか三つの四つのファイルを引数に指定してください。
@ -151,9 +145,6 @@ Amiga の場合は、新しいウィンドウで再起動しなくなります
を起動して、編集が終わるまで待機したいような場合に使ってください。
Amiga では、":sh" と "!" コマンドは機能しなくなります。
.TP
\-\-nofork
フォアグラウンド。GUI バージョンで、プロセスをフォークしなくなります。
.TP
\-F
ペルシア語がサポートされていて、ペルシア語キーマップがある場合は、
ペルシア語モードで起動します ('fkmap' と 'rightleft' がオンになります)。
@ -195,12 +186,6 @@ lisp モード。
ファイルの変更と保存ができなくなります。
Note: それらのオプションを設定すれば変更できるようになります。
.TP
\-N
非互換モード。'compatible' オプションがオフになります。
.vimrc ファイルの有無に関わらず、
.B Vim
の改良された機能が有効になります。Vi との互換性が少し失われます。
.TP
\-n
スワップファイルを使用しません。
クラッシュしてもリカバリできなくなります。

View File

@ -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.
@ -178,11 +172,6 @@ jest wywoływany przez program, który ma zaczekać na koniec sesji (np.
mail).
Na Amidze polecenia ":sh" i ":!" nie będą działać.
.TP
\-\-nofork
Pierwszy plan. Dla wersji GUI.
.B Vim
nie oddzieli się od powłoki w jakiej został uruchomiony.
.TP
\-F
Jeśli Vim został skompilowany ze wsparciem FKMAP dla edycji tekstów od
prawej do lewej i mapowania klawiatury Farsi, ta opcja uruchomi
@ -241,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.

View File

@ -124,11 +124,6 @@ vim \- Vi IMproved (Улучшенный Vi), текстовый редакто
Производится настройка некоторых опций, делающих возможной правку
двоичного или исполняемого файла.
.TP
\-C
Режим совместимости. Включает опцию 'compatible'.
.B Vim
будет работать почти как Vi, даже если существует файл .vimrc.
.TP
\-d
Режим поиска различий.
Должно быть указано два или три имени файла.
@ -158,12 +153,6 @@ vim \- Vi IMproved (Улучшенный Vi), текстовый редакто
сеанса правки (например, программа для работы с электронной почтой).
На платформе Amiga команды ":sh" и ":!" не будут работать.
.TP
\-\-nofork
Режим активного приложения. Версия
.B Vim
с графическим интерфейсом не будет ветвиться и отключаться
от запустившей её оболочки.
.TP
\-F
Если
.B Vim
@ -216,12 +205,6 @@ vim \- Vi IMproved (Улучшенный Vi), текстовый редакто
Изменение файлов запрещено. При этом отключается опция 'write', поэтому
запись файлов становится невозможной.
.TP
\-N
Режим неполной совместимости. Отключается 'compatible'.
.B Vim
будет работать лучше, но не будет полностью совместим с Vi, даже если
отсутствует файл сценария настроек (.vimrc).
.TP
\-n
Не использовать своп-файл. Восстановление при сбое в работе будет невозможно.
Удобно для правки файла на очень медленном носителе (например, гибком диске).

View File

@ -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.
@ -164,11 +158,6 @@ This option should be used when
is executed by a program that will wait for the edit
session to finish (e.g. mail).
.TP
\-\-nofork
Foreground. For the GUI version,
.B Vim
will not fork and detach from the shell it was started in.
.TP
\-F
If
.B Vim
@ -228,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.

View File

@ -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

View File

@ -74,6 +74,7 @@ There are four ways to open msgpack-rpc streams to nvim:
2. Through the stdin/stdout of a program spawned by the |rpcstart()| function.
*$NVIM_LISTEN_ADDRESS*
3. Through the socket automatically created with each instance. To find out
the socket location (which is random by default) from a running nvim
instance, one can inspect the |$NVIM_LISTEN_ADDRESS| environment variable:

View File

@ -9,7 +9,7 @@ Nvim provider infrastructure *nvim-provider*
First of all, this document is meant to be read by developers interested in
contributing to the refactoring effort. If you are a normal user or plugin
developer looking to learn about Nvim |msgpack-rpc| infrastructure for
implementing plugins in other programming languages, see |external-plugin|.
implementing plugins in other programming languages, see |remote-plugin|.
For instructions on how to enable Python plugins, see |nvim-python|. For
clipboard, see |nvim-clipboard|.

View File

@ -3491,14 +3491,6 @@ A jump table for the options with a short description can be found at |Q_op|.
When 'e' is missing a non-GUI tab pages line may be used.
The GUI tabs are only supported on some systems, currently
GTK, Motif, Mac OS/X and MS-Windows.
*'go-f'*
'f' Foreground: Don't use fork() to detach the GUI from the shell
where it was started. Use this for programs that wait for the
editor to finish (e.g., an e-mail program). Alternatively you
can use "gvim -f" or ":gui -f" to start the GUI in the
foreground. |gui-fork|
Note: Set this option in the vimrc file. The forking may have
happened already when the |gvimrc| file is read.
*'go-i'*
'i' Use a Vim icon. For GTK with KDE it is used in the left-upper
corner of the window. It's black&white on non-GTK, because of
@ -5530,7 +5522,7 @@ A jump table for the options with a short description can be found at |Q_op|.
$HOME/.vim/after"
Macintosh: "$VIM:vimfiles,
$VIMRUNTIME,
$VIM:vimfiles:after"
$VIM:vimfiles:after")
global
{not in Vi}
This is a list of directories which will be searched for runtime

View File

@ -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*

View File

@ -26,7 +26,6 @@ For executing external commands fork()/exec() is used when possible, otherwise
system() is used, which is a bit slower. The output of ":version" includes
|+fork| when fork()/exec() is used, |+system()| when system() is used. This
can be changed at compile time.
(For forking of the GUI version see |gui-fork|.)
Because terminal updating under Unix is often slow (e.g. serial line
terminal, shell window in suntools), the 'showcmd' and 'ruler' options

View File

@ -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,13 +1136,10 @@ 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
|-o| -o [num] open [num] windows (default: one for each file)
|-f| -f GUI: foreground process, don't fork
|-s| -s {scriptin} first read commands from the file {scriptin}
|-w| -w {scriptout} write typed chars to file {scriptout} (append)
|-W| -W {scriptout} write typed chars to file {scriptout} (overwrite)

View File

@ -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.

View File

@ -57,7 +57,7 @@ filename One or more file names. The first one will be the current
that needs to be saved. Except when in readonly mode, then
the buffer is not marked modified. Example: >
ls | nvim -R -
Starting in Ex mode: >
< Starting in Ex mode: >
nvim -e -
nvim -E
< Start editing in silent mode. See |-s-ex|.
@ -212,7 +212,7 @@ argument.
{not in Vi}
*-g*
-g Start Vim in GUI mode. See |gui|. For the opposite see |-v|.
-g Start Vim in GUI mode. See |gui|.
{not in Vi}
*-e*
@ -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
@ -359,24 +341,7 @@ argument.
*-d*
-d Start in |diff-mode|.
*-f*
-f GUI: Do not disconnect from the program that started Vim.
'f' stands for "foreground". If omitted, the GUI forks a new
process and exits the current one. "-f" should be used when
gvim is started by a program that will wait for the edit
session to finish (e.g., mail or readnews). If you want gvim
never to fork, include 'f' in 'guioptions' in your |gvimrc|.
Careful: You can use "-gf" to start the GUI in the foreground,
but "-fg" is used to specify the foreground color. |gui-fork|
MS-Windows: This option is not supported. However, when
running Vim with an installed vim.bat or gvim.bat file it
works.
{not in Vi}
*--nofork*
--nofork GUI: Do not fork. Same as |-f|.
*-u* *E282*
-u {vimrc} The file {vimrc} is read for initializations. Most other
initializations are skipped; see |initialization|. This can
@ -391,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*
@ -529,9 +491,6 @@ X11 GUI support. See |gui-resources|.
==============================================================================
3. Initialization *initialization* *startup*
This section is about the non-GUI version of Vim. See |gui-fork| for
additional initialization when starting the GUI.
At startup, Vim checks environment variables and files and sets values
accordingly. Vim proceeds in this order:
@ -584,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*
@ -594,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
@ -613,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: >
@ -691,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
@ -721,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
@ -970,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*

View File

@ -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.
@ -4527,7 +4527,7 @@ term={attr-list} *attr-list* *highlight-term* *E418*
following items (in any order):
bold
underline
undercurl not always available
undercurl a curly underline
reverse
inverse same as reverse
italic
@ -4536,9 +4536,8 @@ term={attr-list} *attr-list* *highlight-term* *E418*
Note that "bold" can be used here and by using a bold font. They
have the same effect.
"undercurl" is a curly underline. When "undercurl" is not possible
then "underline" is used. In general "undercurl" is only available in
the GUI. The color is set with |highlight-guisp|.
If running in a terminal, "undercurl" acts as an alias for "underline".
It is set using |highlight-guisp|.
start={term-list} *highlight-start* *E422*
stop={term-list} *term-list* *highlight-stop*

View File

@ -25,8 +25,7 @@ NOTE: Most of this is not used when running the |GUI|.
1. Startup *startup-terminal*
When Vim is started a default terminal type is assumed. for MS-DOS this is
the pc terminal, for Unix an ansi terminal. A few other terminal types are
always available, see below |builtin-terms|.
the pc terminal, for Unix an ansi terminal.
You can give the terminal name with the '-T' Vim argument. If it is not given
Vim will try to get the name from the TERM environment variable.

View File

@ -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 = {}

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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 ~
@ -72,13 +71,6 @@ In this section we will explain the various commands used in this file. This
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

View File

@ -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|.

View File

@ -782,7 +782,7 @@ Only Vim is able to accept options in between and after the file names.
--literal Vim: take file names literally, don't expand wildcards.
--nofork Vim: same as |-f|
--nofork Vim: same as -f
--noplugin[s] Vim: Skip loading plugins.

View File

@ -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

View File

@ -345,13 +345,6 @@ typedef enum {
VAR_FLAVOUR_VIMINFO /* all uppercase */
} var_flavour_T;
/*
* Array to hold the value of v: variables.
* The value is in a dictitem, so that it can also be used in the v: scope.
* The reason to use this table anyway is for very quick access to the
* variables with the VV_ defines.
*/
/* values for vv_flags: */
#define VV_COMPAT 1 /* compatible, also used without "v:" */
#define VV_RO 2 /* read-only */
@ -359,6 +352,10 @@ typedef enum {
#define VV_NAME(s, t) s, {{t, 0, {0}}, 0, {0}}, {0}
// Array to hold the value of v: variables.
// The value is in a dictitem, so that it can also be used in the v: scope.
// The reason to use this table anyway is for very quick access to the
// variables with the VV_ defines.
static struct vimvar {
char *vv_name; /* name of variable, without v: */
dictitem_T vv_di; /* value and name for key */

View File

@ -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();

View File

@ -891,7 +891,6 @@ static void command_line_scan(mparm_T *parmp)
/* "--help" give help message */
/* "--version" give version message */
/* "--literal" take files literally */
/* "--nofork" don't fork */
/* "--noplugin[s]" skip plugins */
/* "--cmd <cmd>" execute cmd before vimrc */
if (STRICMP(argv[0] + argv_idx, "help") == 0)
@ -923,7 +922,6 @@ static void command_line_scan(mparm_T *parmp)
#if !defined(UNIX)
parmp->literal = TRUE;
#endif
} else if (STRNICMP(argv[0] + argv_idx, "nofork", 6) == 0) {
} else if (STRNICMP(argv[0] + argv_idx, "noplugin", 8) == 0)
p_lpl = FALSE;
else if (STRNICMP(argv[0] + argv_idx, "cmd", 3) == 0) {
@ -1963,7 +1961,7 @@ static void mainerr(int n, const char *str)
}
/// Prints help message and exits; used for 'nvim -h' & 'nvim --help'
/// Prints help message for "nvim -h" or "nvim --help" and exits.
static void usage(void)
{
signal_stop(); // kill us with CTRL-C here, if you like

View File

@ -723,7 +723,7 @@ static void complete_call(msgpack_object *obj, Channel *channel)
static void call_set_error(Channel *channel, char *msg)
{
ELOG("Msgpack-RPC error: %s", msg);
ELOG("msgpack-rpc: %s", msg);
for (size_t i = 0; i < kv_size(channel->call_stack); i++) {
ChannelCallFrame *frame = kv_A(channel->call_stack, i);
frame->returned = true;

View File

@ -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;

View File

@ -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