Merge #2008 'Special interfaces cleanup'

This commit is contained in:
Justin M. Keyes 2015-03-12 21:59:33 -04:00
commit b5bb6269b0
19 changed files with 41 additions and 490 deletions

1
.gitignore vendored
View File

@ -20,6 +20,7 @@
/.vim-src/ /.vim-src/
# Files generated by the tests # Files generated by the tests
/src/nvim/testdir/del
/src/nvim/testdir/mbyte.vim /src/nvim/testdir/mbyte.vim
/src/nvim/testdir/mzscheme.vim /src/nvim/testdir/mzscheme.vim
/src/nvim/testdir/lua.vim /src/nvim/testdir/lua.vim

View File

@ -1551,9 +1551,9 @@ v:profiling Normally zero. Set to one after using ":profile start".
See |profiling|. See |profiling|.
*v:progname* *progname-variable* *v:progname* *progname-variable*
v:progname Contains the name (with path removed) with which Vim was v:progname Contains the name (with path removed) with which Nvim was
invoked. Allows you to do special initialisations for |view|, invoked. Allows you to do special initialisations for any
|rview|, or any other name you might symlink to Vim. other name you might symlink to Nvim.
Read-only. Read-only.
*v:progpath* *progpath-variable* *v:progpath* *progpath-variable*

View File

@ -17,15 +17,6 @@ vim \- Vi IMproved, ein Text\-Editor für Programmierer
\fBvim\fP [Optionen] \-t Tag \fBvim\fP [Optionen] \-t Tag
.br .br
\fBvim\fP [Optionen] \-q [Fehlerdatei] \fBvim\fP [Optionen] \-q [Fehlerdatei]
.PP
.br
\fBex\fP
.br
\fBview\fP
.br
\fBgvim\fP \fBgview\fP
.br
\fBrvim\fP \fBrview\fP \fBrgvim\fP \fBrgview\fP
.SH BESCHREIBUNG .SH BESCHREIBUNG
\fBVim\fP ist ein Text\-Editor, der aufwärtskompatibel zu Vi ist. Er kann \fBVim\fP ist ein Text\-Editor, der aufwärtskompatibel zu Vi ist. Er kann
verwendet werden, um alle Arten von Klartext zu bearbeiten. Er ist besonders verwendet werden, um alle Arten von Klartext zu bearbeiten. Er ist besonders
@ -82,29 +73,6 @@ erste Fehler wird angezeigt. Falls [Fehlerdatei] ausgelassen wird, wird der
Dateiname aus der Option 'errorfile' verwendet (bei AmigaOS ist dies Dateiname aus der Option 'errorfile' verwendet (bei AmigaOS ist dies
vorgabemäßig »AztecC.Err«, sowie „errors.err« bei anderen). Weitere Fehler vorgabemäßig »AztecC.Err«, sowie „errors.err« bei anderen). Weitere Fehler
können mit dem »:cn«\-Befehl angesprungen werden. Siehe „:help quickfix«. können mit dem »:cn«\-Befehl angesprungen werden. Siehe „:help quickfix«.
.PP
\fBVim\fP reagiert unterschiedlich auf den Namen, der verwendet wird, um Vim zu
starten (die ausführbare Datei kann dieselbe sein).
.TP 10
vim
der »normale« Weg, alles ist standardmäßig
.TP
ex
Startet im Ex\-Modus. Mit dem Befehl »:vi« gelangt man in den normalen
Modus. Funktioniert auch mit dem Argument »\-e«.
.TP
view
Startet im Nur\-Lesen\-Modus. Die Datei wird vor dem Überschreiben
geschützt. Dasselbe wird mit dem Parameter »\-R« erreicht.
.TP
gvim gview
Die grafische Version: Öffnet ein neues Fenster. Dasselbe wird mit dem
Parameter »\-g« erreicht.
.TP
rvim rview rgvim rgview
Wie die obigen, aber mit Beschränkungen: Es ist nicht möglich, Shell\-Befehle
aufzurufen oder mit Unterbrechung in eine Shell zurückzuspringen. Dasselbe
wird mit dem Parameter »\-Z« erreicht.
.SH OPTIONEN .SH OPTIONEN
Die Optionen können in beliebiger Reihenfolge vor oder nach den Dateinamen Die Optionen können in beliebiger Reihenfolge vor oder nach den Dateinamen
angegeben werden. Optionen ohne Parameter können hinter einem einzigen angegeben werden. Optionen ohne Parameter können hinter einem einzigen
@ -305,11 +273,6 @@ Ausführlich (verbose): Gibt Meldungen darüber, welche Befehlsdateien
eingelesen werden, und über das Lesen und Schreiben einer VimInfo\-Datei. Die eingelesen werden, und über das Lesen und Schreiben einer VimInfo\-Datei. Die
optionale Zahl N ist der Wert für 'verbose'. Vorgabe ist 10. optionale Zahl N ist der Wert für 'verbose'. Vorgabe ist 10.
.TP .TP
\-v
Startet \fBVim\fP im Vi\-Modus, so als würde die ausführbare Datei mit »vi«
aufgerufen. Dies wirkt sich nur aus, wenn die ausführbare Datei als »ex«
aufgerufen wird.
.TP
\-w {Ausgabeskript} \-w {Ausgabeskript}
Alle Zeichen, die eingetippt werden, werden in der Datei {Ausgabeskript} Alle Zeichen, die eingetippt werden, werden in der Datei {Ausgabeskript}
aufgezeichnet, solange bis Sie \fBVim\fP beenden. Dies ist nützlich, falls Sie aufgezeichnet, solange bis Sie \fBVim\fP beenden. Dies ist nützlich, falls Sie

View File

@ -21,19 +21,6 @@ vim \- Vi IMproved, éditeur de texte pour programmeurs
.br .br
.B vim .B vim
[options] \-q [fichiererreurs] [options] \-q [fichiererreurs]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH DESCRIPTION .SH DESCRIPTION
.B Vim .B Vim
est un éditeur de texte proposant une compatibilité ascendante est un éditeur de texte proposant une compatibilité ascendante
@ -101,33 +88,6 @@ l'option 'errorfile' ("AztecC.Err" par défaut sur Amiga, "errors.err" sur les
autres systèmes). autres systèmes).
La commande ":cn" permet de sauter aux erreurs suivantes. La commande ":cn" permet de sauter aux erreurs suivantes.
Voir ":help quickfix". Voir ":help quickfix".
.PP
.B Vim
se comporte différemment selon le nom de la commande (l'exécutable peut
cependant être le même fichier).
.TP 10
vim
La façon "normale", le comportement par défaut.
.TP
ex
Démarre en mode Ex.
La commande ":vi" permet de passer en mode Normal.
Ce mode est également accessible avec l'argument "\-e".
.TP
view
Démarre en mode Lecture-Seule. Vous êtes protégé de l'écriture accidentelle
des fichiers. Ce mode est également accessible avec l'argument "\-R".
.TP
gvim gview
La version graphique.
Ouvre une nouvelle fenêtre.
Également accessible avec l'argument "\-g".
.TP
rvim rview rgvim rgview
Comme ci-dessus, mais avec des restrictions. Il vous sera impossible de
lancer des commandes du shell, ou de suspendre
.B Vim.
Également accessible avec l'argument "\-Z".
.SH OPTIONS .SH OPTIONS
Les options peuvent être spécifiées dans n'importe quel ordre, Les options peuvent être spécifiées dans n'importe quel ordre,
avant ou après les noms de fichiers. Les options sans arguments avant ou après les noms de fichiers. Les options sans arguments
@ -389,12 +349,6 @@ Donne des messages à propos des fichiers sourcés, ainsi que sur la lecture
et les écritures dans le fichier viminfo. le nombre optionnel N précise la et les écritures dans le fichier viminfo. le nombre optionnel N précise la
valeur de l'option 'verbose' (10 par défaut). valeur de l'option 'verbose' (10 par défaut).
.TP .TP
\-v
Démarre
.B Vim
en mode Vi, comme si l'exécutable s'appelait "vi". Cela n'a d'effet que si
l'exécutable invoqué est "ex".
.TP
\-w {scriptSortie} \-w {scriptSortie}
Tous les caractères que vous tapez sont enregistrés dans le fichier Tous les caractères que vous tapez sont enregistrés dans le fichier
{scriptSortie}, jusqu'à ce que vous quittiez {scriptSortie}, jusqu'à ce que vous quittiez

View File

@ -14,19 +14,6 @@ vim \- VI Migliorato, un editor di testi per programmatori
.br .br
.B vim .B vim
[opzioni] \-q [file_errori] [opzioni] \-q [file_errori]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH DESCRIZIONE .SH DESCRIZIONE
.B Vim .B Vim
Un editore di testi, compatibile con, e migliore di, Vi. Un editore di testi, compatibile con, e migliore di, Vi.
@ -94,33 +81,6 @@ dell'opzione 'errorfile' (che, se non specificata, vale "AztecC.Err"
per l'Amiga, "errors.err" su altri sistemi). per l'Amiga, "errors.err" su altri sistemi).
Si può saltare all'errore successivo col comando ":cn". Si può saltare all'errore successivo col comando ":cn".
Vedere ":help quickfix". Vedere ":help quickfix".
.PP
.B Vim
si comporta in modo diverso se invocato con nomi differenti (il programma
eseguibile "sottostante" può essere sempre lo stesso).
.TP 10
vim
Modo Normal, comportamento normale.
.TP
ex
Inizia in Modo "Ex".
Si può passare in Modo Normal col comando ":vi".
Si può invocare il Modo "Ex" anche con l'argomento "\-e".
.TP
view
Inizia in Modo Read-only (Sola Lettura). Non potete modificare i file.
Si può invocare il Modo Read-only anche con l'argomento "\-R".
.TP
gvim gview
La versione GUI [Graphical User Interface].
Apre una nuova finestra.
Si può invocare il Modo GUI anche con l'argomento "\-g".
.TP
rvim rview rgvim rgview
Come sopra, ma con restrizioni ai comandi. Non si potranno eseguire comandi
della shell o sospendere
.B Vim.
Si può chiedere la stessa cosa anche con l'argomento "\-Z".
.SH OPZIONI .SH OPZIONI
Le opzioni possono essere in un ordine qualsiasi, prima o dopo i nomi di Le opzioni possono essere in un ordine qualsiasi, prima o dopo i nomi di
file. Opzioni che non necessitano un argomento possono essere specificate file. Opzioni che non necessitano un argomento possono essere specificate
@ -372,12 +332,6 @@ e quando legge o scrive un file viminfo. Il numero opzionale N è il valore
dell'opzione 'verbose'. dell'opzione 'verbose'.
Il valore predefinito è 10. Il valore predefinito è 10.
.TP .TP
\-v
Inizia
.B Vim
in Modo Vi, come se il programma eseguibile fosse "vi". Questo ha
effetto solo quando Vim viene invocato con il nome "ex".
.TP
\-w {scriptout} \-w {scriptout}
Ogni carattere immesso viene registrato nel file {scriptout}, Ogni carattere immesso viene registrato nel file {scriptout},
finché non uscite da finché non uscite da

View File

@ -14,19 +14,6 @@ vim \- Vi IMproved, プログラマのテキストエディタ
.br .br
.B vim .B vim
[options] \-q [errorfile] [options] \-q [errorfile]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH 説明 .SH 説明
.B Vim .B Vim
は Vi 互換のテキストエディタです。 は Vi 互換のテキストエディタです。
@ -84,33 +71,6 @@ tags ファイルから {tag} が検索され、関連したファイルがカ
は、Amiga では "AztecC.Err"、その他のシステムでは "errors.err" です)。 は、Amiga では "AztecC.Err"、その他のシステムでは "errors.err" です)。
":cn" コマンドで次のエラーにジャンプできます。 ":cn" コマンドで次のエラーにジャンプできます。
詳しくは ":help quickfix" を参照してください。 詳しくは ":help quickfix" を参照してください。
.PP
.B Vim
は、起動されたときの実行ファイルの名前によって動作を変えます
(実行ファイルの実体が同じであっても)。
.TP 10
vim
"普通" に起動します。標準の状態です。
.TP
ex
Ex モードで起動します。
ノーマルモードに切り替えるには ":vi" コマンドを使ってください。
引数に "\-e" を指定した場合と同じです。
.TP
view
読み込み専用モードで起動します。ファイルの保存が制限されます。
引数に "\-R" を指定した場合と同じです。
.TP
gvim gview
GUI バージョン。
新しいウィンドウを開いて起動します。
引数に "\-g" を指定した場合と同じです。
.TP
rvim rview rgvim rgview
上記と同じですが、制限モードで起動します。シェルコマンドを実行したり、
.B Vim
をサスペンドしたりできなくなります。
引数に "\-Z" を指定した場合と同じです。
.SH オプション .SH オプション
ファイル名の前でも後ろでも、好きな順番でオプションを指定できます。 ファイル名の前でも後ろでも、好きな順番でオプションを指定できます。
パラメータを必要としない引数は、一つのダッシュにまとめて指定できます。 パラメータを必要としない引数は、一つのダッシュにまとめて指定できます。
@ -320,11 +280,6 @@ termcap または terminfo ファイルで定義されている名前を指定
びにメッセージを表示します。N に指定した数値が 'verbose' に設定されます。 びにメッセージを表示します。N に指定した数値が 'verbose' に設定されます。
省略した場合は 10 になります。 省略した場合は 10 になります。
.TP .TP
\-v
Vi モードで起動します。
実行ファイルの名前が "vi" の場合と同じです。
実行ファイルの名前が "ex" の場合だけ効果があります。
.TP
\-w {scriptout} \-w {scriptout}
入力した文字を {scriptout} に記録します。 入力した文字を {scriptout} に記録します。
"vim \-s" や "source!" で実行するためのスクリプトファイルを作成するのに便利 "vim \-s" や "source!" で実行するためのスクリプトファイルを作成するのに便利

View File

@ -14,19 +14,6 @@ vim \- Vi rozbudowany, edytor tekstu dla programisty
.br .br
.B vim .B vim
[opcje] \-q [plik_błędu] [opcje] \-q [plik_błędu]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH OPIS .SH OPIS
.B Vim .B Vim
jest edytorem tekstu kompatybilnym z Vi. Może być jest edytorem tekstu kompatybilnym z Vi. Może być
@ -93,35 +80,6 @@ Jeśli brak opcji [plik_błędów] nazwa pliku zostanie pobrana z opcji
systemów. systemów.
Do kolejnych błędów można przeskoczyć dzięki poleceniu ":cn". Do kolejnych błędów można przeskoczyć dzięki poleceniu ":cn".
Zobacz ":help quickfix". Zobacz ":help quickfix".
.PP
W zależności od wywołania
.B Vim
zachowuje się inaczej (program może być cały czas tym samym
plikiem).
.TP 10
vim
"Normalny" sposób, wszystko jest domyślne.
.TP
ex
Zacznij w trybie Ex.
Przejdź do trybu Normalnego poleceniem ":vi".
Można także uruchomić poprzez argument "\-e".
.TP
view
Zacznij w trybie tylko do odczytu. W ten sposób będziesz chroniony
przed zapisywaniem pliku. Można także uruchomić poprzez argument
"\-R".
.TP
gvim gview
Wersja GUI.
Uruchamia nowe okno.
Można także uruchomić poprzez argument "\-g".
.TP
rvim rview rgvim rgview
Podobnie jak powyżej, ale z ograniczeniami. Nie będzie można uruchomić
poleceń powłoki lub zawiesić
.B Vima.
Można także uruchomić poprzez argument "\-Z".
.SH OPCJE .SH OPCJE
Opcje można podać w dowolnej kolejności, przed lub po nazwach plików. Opcje można podać w dowolnej kolejności, przed lub po nazwach plików.
Opcje bez argumentów można łączyć po pojedynczym myślniku. Opcje bez argumentów można łączyć po pojedynczym myślniku.
@ -371,12 +329,6 @@ Tryb gadatliwy. Wypisz wiadomości o tym jaki pliki są wczytywane
i o informacjach pobieranych i dodawanych do pliku viminfo. Opcjonalny i o informacjach pobieranych i dodawanych do pliku viminfo. Opcjonalny
argument N jest wartością 'verbose'. Domyślnie 10. argument N jest wartością 'verbose'. Domyślnie 10.
.TP .TP
\-v
Uruchom
.B Vima
w trybie Vi, tak jakby program był nazwany "vi". Ma znaczenie
tylko wtedy jeśli program nazwany jest "ex".
.TP
\-w {plik} \-w {plik}
Wszystkie wciśnięcia klawiszy, aż do zakończenia działania programu, Wszystkie wciśnięcia klawiszy, aż do zakończenia działania programu,
są zapisywane w {plik} . są zapisywane w {plik} .

View File

@ -14,19 +14,6 @@ vim \- Vi IMproved (Улучшенный Vi), текстовый редакто
.br .br
.B vim .B vim
[ключи] \-q [файл ошибок] [ключи] \-q [файл ошибок]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH ОПИСАНИЕ .SH ОПИСАНИЕ
.B Vim .B Vim
-- текстовый редактор, обратно-совместимый с Vi. -- текстовый редактор, обратно-совместимый с Vi.
@ -90,32 +77,6 @@ vim \- Vi IMproved (Улучшенный Vi), текстовый редакто
(по умолчанию: "AztecC.Err" для Amiga, "errors.err" для других систем). (по умолчанию: "AztecC.Err" для Amiga, "errors.err" для других систем).
К следующим ошибкам можно перейти по команде ":cn". К следующим ошибкам можно перейти по команде ":cn".
См. ":help quickfix". См. ":help quickfix".
.PP
.B Vim
ведёт себя по-разному в зависимости от имени команды (исполняемый файл может
быть одним и тем же).
.TP 10
vim
"Нормальный" запуск, всё по умолчанию.
.TP
ex
Запуск в режиме Ex. Для перехода в нормальный режим
необходимо выполнить команду ":vi". Режим Ex включает
также ключ "\-e".
.TP
view
Запуск в режиме "только для чтения". Вы будете защищены от случайной записи
файла. То же самое можно сделать ключом "\-R".
.TP
gvim gview
Версия с графическим интерфейсом. Запускается в новом окне.
То же самое можно сделать при запуске с ключом "\-g".
.TP
rvim rview rgvim rgview
Как и предыдущие команды, но с ограничениями. Нельзя запускать команды оболочки
или приостанавливать работу
.B Vim.
Вместо приставки "r" можно использовать ключ "\-Z".
.SH КЛЮЧИ .SH КЛЮЧИ
Ключи могут быть указаны в любом порядке, до или после имён Ключи могут быть указаны в любом порядке, до или после имён
файлов. Ключи без аргументов могут быть объединены под одним файлов. Ключи без аргументов могут быть объединены под одним
@ -329,12 +290,6 @@ rvim rview rgvim rgview
"Болтливый" режим. Выводить сообщения о том, какие файлы читаются, и о "Болтливый" режим. Выводить сообщения о том, какие файлы читаются, и о
чтении-записи файла viminfo. чтении-записи файла viminfo.
.TP .TP
\-v
Запустить
.B Vim
в режиме Vi, как будто исполняемый файл имеет имя "vi". Имеет смысл только если
исполняемый файл имеет имя "ex".
.TP
\-w {scriptout} \-w {scriptout}
Все символы, введённые с клавиатуры вплоть до момента завершения работы, Все символы, введённые с клавиатуры вплоть до момента завершения работы,
записываются в файл {scriptout}. записываются в файл {scriptout}.

View File

@ -14,19 +14,6 @@ vim \- Vi IMproved, a programmers text editor
.br .br
.B vim .B vim
[options] \-q [errorfile] [options] \-q [errorfile]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH DESCRIPTION .SH DESCRIPTION
.B Vim .B Vim
is a text editor that is upwards compatible to Vi. is a text editor that is upwards compatible to Vi.
@ -91,33 +78,6 @@ If [errorfile] is omitted, the filename is obtained from the 'errorfile'
option (defaults to "errors.err"). option (defaults to "errors.err").
Further errors can be jumped to with the ":cn" command. Further errors can be jumped to with the ":cn" command.
See ":help quickfix". See ":help quickfix".
.PP
.B Vim
behaves differently, depending on the name of the command (the executable may
still be the same file).
.TP 10
vim
The "normal" way, everything is default.
.TP
ex
Start in Ex mode.
Go to Normal mode with the ":vi" command.
Can also be done with the "\-e" argument.
.TP
view
Start in read-only mode. You will be protected from writing the files. Can
also be done with the "\-R" argument.
.TP
gvim gview
The GUI version.
Starts a new window.
Can also be done with the "\-g" argument.
.TP
rvim rview rgvim rgview
Like the above, but with restrictions. It will not be possible to start shell
commands, or suspend
.B Vim.
Can also be done with the "\-Z" argument.
.SH OPTIONS .SH OPTIONS
The options may be given in any order, before or after filenames. The options may be given in any order, before or after filenames.
Options without an argument can be combined after a single dash. Options without an argument can be combined after a single dash.
@ -188,12 +148,12 @@ script.
\-e \-e
Start Start
.B Vim .B Vim
in Ex mode, just like the executable was called "ex". in Ex mode.
.TP .TP
\-E \-E
Start Start
.B Vim .B Vim
in improved Ex mode, just like the executable was called "exim". in improved Ex mode.
.TP .TP
\-f \-f
Foreground. For the GUI version, Foreground. For the GUI version,
@ -319,8 +279,7 @@ appended.
See ":help recovery". See ":help recovery".
.TP .TP
\-s \-s
Silent mode. Only when started as "Ex" or when the "\-e" option was given Silent mode. Only when the "\-e" option was given before the "\-s" option.
before the "\-s" option.
.TP .TP
\-s {scriptin} \-s {scriptin}
The script file {scriptin} is read. The script file {scriptin} is read.
@ -357,12 +316,6 @@ Verbose. Give messages about which files are sourced and for reading and
writing a viminfo file. The optional number N is the value for 'verbose'. writing a viminfo file. The optional number N is the value for 'verbose'.
Default is 10. Default is 10.
.TP .TP
\-v
Start
.B Vim
in Vi mode, just like the executable was called "vi". This only has effect
when the executable is called "ex".
.TP
\-w {scriptout} \-w {scriptout}
All the characters that you type are recorded in the file All the characters that you type are recorded in the file
{scriptout}, until you exit {scriptout}, until you exit
@ -379,7 +332,7 @@ Don't connect to the X server. Shortens startup time in a terminal, but the
window title and clipboard will not be used. window title and clipboard will not be used.
.TP .TP
\-Z \-Z
Restricted mode. Works like the executable starts with "r". Restricted mode.
.TP .TP
\-\- \-\-
Denotes the end of the options. Denotes the end of the options.

View File

@ -1128,7 +1128,6 @@ Context-sensitive completion on the command-line:
|-+| +[num] put the cursor at line [num] (default: last line) |-+| +[num] put the cursor at line [num] (default: last line)
|-+c| +{command} execute {command} after loading the file |-+c| +{command} execute {command} after loading the file
|-+/| +/{pat} {file} .. put the cursor at the first occurrence of {pat} |-+/| +/{pat} {file} .. put the cursor at the first occurrence of {pat}
|-v| -v Vi mode, start ex in Normal mode
|-e| -e Ex mode, start vim in Ex mode |-e| -e Ex mode, start vim in Ex mode
|-R| -R Read-only mode, implies -n |-R| -R Read-only mode, implies -n
|-m| -m modifications not allowed (resets 'write' option) |-m| -m modifications not allowed (resets 'write' option)

View File

@ -19,11 +19,11 @@ Starting Vim *starting*
Most often, Vim is started to edit a single file with the command Most often, Vim is started to edit a single file with the command
vim filename *-vim* nvim filename *-vim*
More generally, Vim is started with: More generally, Vim is started with:
vim [option | filename] .. nvim [option | filename] ..
Option arguments and file name arguments can be mixed, and any number of them Option arguments and file name arguments can be mixed, and any number of them
can be given. However, watch out for options that take an argument. can be given. However, watch out for options that take an argument.
@ -39,7 +39,7 @@ filename One or more file names. The first one will be the current
on the first line of the buffer. on the first line of the buffer.
To avoid a file name starting with a '-' being interpreted as To avoid a file name starting with a '-' being interpreted as
an option, precede the arglist with "--", e.g.: > an option, precede the arglist with "--", e.g.: >
vim -- -filename nvim -- -filename
< All arguments after the "--" will be interpreted as file names, < All arguments after the "--" will be interpreted as file names,
no other options or "+command" argument can follow. no other options or "+command" argument can follow.
@ -48,22 +48,18 @@ filename One or more file names. The first one will be the current
mode is to be used. mode is to be used.
Starting in Normal mode: > Starting in Normal mode: >
vim - nvim -
ex -v -
< Start editing a new buffer, which is filled with text < Start editing a new buffer, which is filled with text
that is read from stdin. The commands that would normally be that is read from stdin. The commands that would normally be
read from stdin will now be read from stderr. Example: > read from stdin will now be read from stderr. Example: >
find . -name "*.c" -print | vim - find . -name "*.c" -print | nvim -
< The buffer will be marked modified, because it contains text < The buffer will be marked modified, because it contains text
that needs to be saved. Except when in readonly mode, then that needs to be saved. Except when in readonly mode, then
the buffer is not marked modified. Example: > the buffer is not marked modified. Example: >
ls | view - ls | nvim -R -
<
Starting in Ex mode: > Starting in Ex mode: >
ex - nvim -e -
vim -e - nvim -E
exim -
vim -E
< Start editing in silent mode. See |-s-ex|. < Start editing in silent mode. See |-s-ex|.
*-t* *-tag* *-t* *-tag*
@ -85,32 +81,6 @@ filename One or more file names. The first one will be the current
(nothing) Without one of the four items above, Vim will start editing a (nothing) Without one of the four items above, Vim will start editing a
new buffer. It's empty and doesn't have a file name. new buffer. It's empty and doesn't have a file name.
The startup mode can be changed by using another name instead of "vim", which
is equal to giving options:
ex vim -e Start in Ex mode (see |Ex-mode|). *ex*
exim vim -E Start in improved Ex mode (see |Ex-mode|). *exim*
(normally not installed)
view vim -R Start in read-only mode (see |-R|). *view*
gvim vim -g Start the GUI (see |gui|). *gvim*
gex vim -eg Start the GUI in Ex mode. *gex*
gview vim -Rg Start the GUI in read-only mode. *gview*
rvim vim -Z Like "vim", but in restricted mode (see |-Z|) *rvim*
rview vim -RZ Like "view", but in restricted mode. *rview*
rgvim vim -gZ Like "gvim", but in restricted mode. *rgvim*
rgview vim -RgZ Like "gview", but in restricted mode. *rgview*
Additional characters may follow, they are ignored. For example, you can have
"gvim-5" to start the GUI. You must have an executable by that name then, of
course.
On Unix, you would normally have one executable called Vim, and links from the
different startup-names to that executable. If your system does not support
links and you do not want to have several copies of the executable, you could
use an alias instead. For example: >
alias view vim -R
alias gvim vim -g
<
*startup-options* *startup-options*
The option arguments may be given in any order. Single-letter options can be The option arguments may be given in any order. Single-letter options can be
combined after one dash. There can be no option arguments after the "--" combined after one dash. There can be no option arguments after the "--"
@ -245,28 +215,20 @@ argument.
-g Start Vim in GUI mode. See |gui|. For the opposite see |-v|. -g Start Vim in GUI mode. See |gui|. For the opposite see |-v|.
{not in Vi} {not in Vi}
*-v*
-v Start Ex in Vi mode. Only makes a difference when the
executable is called "ex" or "gvim". For gvim the GUI is not
started if possible.
*-e* *-e*
-e Start Vim in Ex mode |Q|. Only makes a difference when the -e Start Vim in Ex mode |Q|.
executable is not called "ex".
*-E* *-E*
-E Start Vim in improved Ex mode |gQ|. Only makes a difference -E Start Vim in improved Ex mode |gQ|.
when the executable is not called "exim".
{not in Vi}
*-s-ex* *-s-ex*
-s Silent or batch mode. Only when Vim was started as "ex" or -s Silent or batch mode. Only when "-s" is preceded by the "-e"
when preceded with the "-e" argument. Otherwise see |-s|, argument. Otherwise see |-s|, which does take an argument
which does take an argument while this use of "-s" doesn't. while this use of "-s" doesn't. To be used when Vim is used
To be used when Vim is used to execute Ex commands from a file to execute Ex commands from a file instead of a terminal.
instead of a terminal. Switches off most prompts and Switches off most prompts and informative messages. Also
informative messages. Also warnings and error messages. warnings and error messages. The output of these commands is
The output of these commands is displayed (to stdout): displayed (to stdout):
:print :print
:list :list
:number :number
@ -561,14 +523,6 @@ argument.
Note that the implementation is still primitive. It won't Note that the implementation is still primitive. It won't
work with all applications and the menu doesn't work. work with all applications and the menu doesn't work.
If the executable is called "view", Vim will start in Readonly mode. This is
useful if you can make a hard or symbolic link from "view" to "vim".
Starting in Readonly mode can also be done with "vim -R".
If the executable is called "ex", Vim will start in "Ex" mode. This means it
will accept only ":" commands. But when the "-v" argument is given, Vim will
start in Normal mode anyway.
Additional arguments are available on unix like systems when compiled with Additional arguments are available on unix like systems when compiled with
X11 GUI support. See |gui-resources|. X11 GUI support. See |gui-resources|.

View File

@ -434,27 +434,9 @@ someone supplied, you can't do this. Do delete the files manually, here is an
example for when "/usr/local" was used as the root: > example for when "/usr/local" was used as the root: >
rm -rf /usr/local/share/vim/vim61 rm -rf /usr/local/share/vim/vim61
rm /usr/local/bin/ex
rm /usr/local/bin/gview
rm /usr/local/bin/gvim
rm /usr/local/bin/gvim
rm /usr/local/bin/rgview
rm /usr/local/bin/rgvim
rm /usr/local/bin/rview
rm /usr/local/bin/rvim
rm /usr/local/bin/rvim
rm /usr/local/bin/view
rm /usr/local/bin/vim rm /usr/local/bin/vim
rm /usr/local/bin/vimtutor rm /usr/local/bin/vimtutor
rm /usr/local/bin/xxd rm /usr/local/bin/xxd
rm /usr/local/man/man1/ex.1
rm /usr/local/man/man1/gview.1
rm /usr/local/man/man1/gvim.1
rm /usr/local/man/man1/rgview.1
rm /usr/local/man/man1/rgvim.1
rm /usr/local/man/man1/rview.1
rm /usr/local/man/man1/rvim.1
rm /usr/local/man/man1/view.1
rm /usr/local/man/man1/vim.1 rm /usr/local/man/man1/vim.1
rm /usr/local/man/man1/vimtutor.1 rm /usr/local/man/man1/vimtutor.1
rm /usr/local/man/man1/xxd.1 rm /usr/local/man/man1/xxd.1

View File

@ -830,10 +830,9 @@ Only Vim is able to accept options in between and after the file names.
-D Vim: debug mode. -D Vim: debug mode.
-e Elvis, Nvi, Vim: Start in Ex mode, as if the executable is -e Elvis, Nvi, Vim: Start in Ex mode.
called "ex".
-E Vim: Start in improved Ex mode |gQ|, like "exim". -E Vim: Start in improved Ex mode |gQ|.
-f Vim: Run GUI in foreground. -f Vim: Run GUI in foreground.
-f {session} Elvis: Use {session} as the session file. -f {session} Elvis: Use {session} as the session file.

View File

@ -14,7 +14,7 @@
" License: VIM License " License: VIM License
" Vim is Charityware, see ":help Uganda" " Vim is Charityware, see ":help Uganda"
" "
" Usage: $ ls -la | view -c "set ft=dirpager" - " Usage: $ ls -la | nvim -R -c "set ft=dirpager" -
" "
" "
",----[ ls(1posix) ]-------------------------------------------------- ",----[ ls(1posix) ]--------------------------------------------------

View File

@ -213,7 +213,7 @@ open_buffer (
* So the modelines have priority over auto commands. * So the modelines have priority over auto commands.
*/ */
/* When reading stdin, the buffer contents always needs writing, so set /* When reading stdin, the buffer contents always needs writing, so set
* the changed flag. Unless in readonly mode: "ls | gview -". * the changed flag. Unless in readonly mode: "ls | nvim -R -".
* When interrupted and 'cpoptions' contains 'i' set changed flag. */ * When interrupted and 'cpoptions' contains 'i' set changed flag. */
if ((got_int && vim_strchr(p_cpo, CPO_INTMOD) != NULL) if ((got_int && vim_strchr(p_cpo, CPO_INTMOD) != NULL)
|| modified_was_set /* ":set modified" used in autocmd */ || modified_was_set /* ":set modified" used in autocmd */

View File

@ -853,7 +853,7 @@ void do_bang(int addr_count, exarg_T *eap, int forceit, int do_in, int do_out)
int scroll_save = msg_scroll; int scroll_save = msg_scroll;
/* /*
* Disallow shell commands for "rvim". * Disallow shell commands in restricted mode (-Z)
* Disallow shell commands from .exrc and .vimrc in current directory for * Disallow shell commands from .exrc and .vimrc in current directory for
* security reasons. * security reasons.
*/ */
@ -1217,7 +1217,7 @@ do_shell (
int save_nwr; int save_nwr;
/* /*
* Disallow shell commands for "rvim". * Disallow shell commands in restricted mode (-Z)
* Disallow shell commands from .exrc and .vimrc in current directory for * Disallow shell commands from .exrc and .vimrc in current directory for
* security reasons. * security reasons.
*/ */
@ -3378,7 +3378,7 @@ void ex_z(exarg_T *eap)
int check_restricted(void) int check_restricted(void)
{ {
if (restricted) { if (restricted) {
EMSG(_("E145: Shell commands not allowed in rvim")); EMSG(_("E145: Shell commands not allowed in restricted mode"));
return TRUE; return TRUE;
} }
return FALSE; return FALSE;

View File

@ -5375,9 +5375,7 @@ static void ex_hide(exarg_T *eap)
*/ */
static void ex_stop(exarg_T *eap) static void ex_stop(exarg_T *eap)
{ {
/* // Disallow suspending in restricted mode (-Z)
* Disallow suspending for "rvim".
*/
if (!check_restricted()) { if (!check_restricted()) {
if (!eap->forceit) { if (!eap->forceit) {
autowrite_all(); autowrite_all();

View File

@ -601,7 +601,7 @@ EXTERN volatile int full_screen INIT(= FALSE);
* otherwise only writing some messages */ * otherwise only writing some messages */
EXTERN int restricted INIT(= FALSE); EXTERN int restricted INIT(= FALSE);
/* TRUE when started as "rvim" */ // TRUE when started in restricted mode (-Z)
EXTERN int secure INIT(= FALSE); EXTERN int secure INIT(= FALSE);
/* non-zero when only "safe" commands are /* non-zero when only "safe" commands are
* allowed, e.g. when sourcing .exrc or .vimrc * allowed, e.g. when sourcing .exrc or .vimrc

View File

@ -204,11 +204,9 @@ int main(int argc, char **argv)
// Check if we have an interactive window. // Check if we have an interactive window.
check_and_set_isatty(&params); check_and_set_isatty(&params);
/* // Get the name with which Nvim was invoked, with and without path.
* Figure out the way to work from the command name argv[0]. set_vim_var_string(VV_PROGPATH, (char_u *)argv[0], -1);
* "view" sets "readonlymode", "rvim" sets "restricted", etc. set_vim_var_string(VV_PROGNAME, path_tail((char_u *)argv[0]), -1);
*/
parse_command_name(&params);
/* /*
* Process the command line arguments. File names are put in the global * Process the command line arguments. File names are put in the global
@ -820,69 +818,8 @@ static void init_locale(void)
} }
TIME_MSG("locale set"); TIME_MSG("locale set");
} }
#endif #endif
/*
* Check for: [r][g][vi|vim|view][ex[im]]
* If the executable name starts with "r" we disable shell commands.
* If the next character is "g" we run the GUI version.
* If the next characters are "view" we start in readonly mode.
* If the next characters are "ex" we start in Ex mode. If it's followed
* by "im" use improved Ex mode.
*/
static void parse_command_name(mparm_T *parmp)
{
char_u *initstr;
initstr = path_tail((char_u *)parmp->argv[0]);
set_vim_var_string(VV_PROGNAME, initstr, -1);
set_vim_var_string(VV_PROGPATH, (char_u *)parmp->argv[0], -1);
if (parse_string(&initstr, "editor", 6))
return;
if (parse_char_i(&initstr, 'r'))
restricted = TRUE;
/* "gvim" starts the GUI. Also accept "Gvim" for MS-Windows. */
if (parse_char_i(&initstr, 'g'))
main_start_gui();
if (parse_string(&initstr, "view", 4)) {
readonlymode = TRUE;
curbuf->b_p_ro = TRUE;
p_uc = 10000; /* don't update very often */
} else {
parse_string(&initstr, "vim", 3); /* consume "vim" if it's there */
}
if (parse_string(&initstr, "ex", 2)) {
if (parse_string(&initstr, "im", 2))
exmode_active = EXMODE_VIM;
else
exmode_active = EXMODE_NORMAL;
}
}
static bool parse_char_i(char_u **input, char val)
{
if (TOLOWER_ASC(**input) == val) {
*input += 1; /* or (*input)++ WITH parens */
return true;
}
return false;
}
static bool parse_string(char_u **input, char *val, int len)
{
if (STRNICMP(*input, val, len) == 0) {
*input += len;
return true;
}
return false;
}
/* /*
* Scan the command line arguments. * Scan the command line arguments.
@ -1134,10 +1071,6 @@ static void command_line_scan(mparm_T *parmp)
} }
break; break;
case 'v': /* "-v" Vi-mode (as if called "vi") */
exmode_active = 0;
break;
case 'w': /* "-w{number}" set window height */ case 'w': /* "-w{number}" set window height */
/* "-w {scriptout}" write to script */ /* "-w {scriptout}" write to script */
if (vim_isdigit(((char_u *)argv[0])[argv_idx])) { if (vim_isdigit(((char_u *)argv[0])[argv_idx])) {
@ -2034,13 +1967,12 @@ static void usage(void)
#if !defined(UNIX) #if !defined(UNIX)
mch_msg(_(" --literal Don't expand wildcards\n")); mch_msg(_(" --literal Don't expand wildcards\n"));
#endif #endif
mch_msg(_(" -v Vi mode (like \"vi\")\n")); mch_msg(_(" -e Ex mode\n"));
mch_msg(_(" -e Ex mode (like \"ex\")\n"));
mch_msg(_(" -E Improved Ex mode\n")); mch_msg(_(" -E Improved Ex mode\n"));
mch_msg(_(" -s Silent (batch) mode (only for \"ex\")\n")); mch_msg(_(" -s Silent (batch) mode (only for ex mode)\n"));
mch_msg(_(" -d Diff mode\n")); mch_msg(_(" -d Diff mode\n"));
mch_msg(_(" -R Readonly mode (like \"view\")\n")); mch_msg(_(" -R Readonly mode\n"));
mch_msg(_(" -Z Restricted mode (like \"rvim\")\n")); mch_msg(_(" -Z Restricted mode\n"));
mch_msg(_(" -m Modifications (writing files) not allowed\n")); mch_msg(_(" -m Modifications (writing files) not allowed\n"));
mch_msg(_(" -M Modifications in text not allowed\n")); mch_msg(_(" -M Modifications in text not allowed\n"));
mch_msg(_(" -b Binary mode\n")); mch_msg(_(" -b Binary mode\n"));