On 24/10/12 14:57, Marvin Renich wrote:
* Tony Mechelynck [121023 23:32]:
---help *-h* *--help*
--h Give usage (help) message and exit. {not in Vi}
+-h Give usage (help) message and exit. {not in Vi} *-h*
See |info-message| about capturing the text.
+-? *-?*
+ Give GTK-specific help, then exit. {only in GTK versions}
+ See |info-message| about capturing the text.
+
+--help {not in Vi} *--help*
+ * GTK versions: give both Vim help (as with -h) and GTK help
+ (as with -?), then exit
+ * Other versions: same as |-h|
+ See |info-message| about capturing the text.
+
+ Note: If the X11 server is not reachable, both -? and --help
+ will (instead of the GTK-specific help) give error |E233|
+ followed by the |hit-enter-prompt|, and start the editor in
+ the terminal.
+
That's odd. I have the GTK2 (not GNOME) version 7.3.547 (Debian
package). -? gives «unknown option argument: "-?"» for both vim and
gvim (both symlinks to the same executable). And -h and --help both
give the same help (including GTK+ help) for both symlinks, regardless
of whether or not DISPLAY is set. (I am not running a GNOME DE.)
Perhaps -? is GNOME-specific, rather than GTK-specific.
Well, I suppose so. Replace GTK by GNOME everywhere in the patch then.
Here is what "vim --help" gives me. The last page or so starting with
"Usage" is what "vim -?" outputs. It is also "instead of that" that I
get E233, hit-enter-prompt, and that Vim does not immediately exit, if
there is no X11 server or if I try it in an X11-less console such as
/dev/tty2.
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 23 2012 05:40:32)
usage: vim [arguments] [file ..] edit specified file(s)
or: vim [arguments] - read text from stdin
or: vim [arguments] -t tag edit file where tag is defined
or: vim [arguments] -q [errorfile] edit file with first error
Arguments:
-- Only file names after this
-g Run using GUI (like "gvim")
-f or --nofork Foreground: Don't fork when starting GUI
-v Vi mode (like "vi")
-e Ex mode (like "ex")
-E Improved Ex mode
-s Silent (batch) mode (only for "ex")
-d Diff mode (like "vimdiff")
-y Easy mode (like "evim", modeless)
-R Readonly mode (like "view")
-Z Restricted mode (like "rvim")
-m Modifications (writing files) not allowed
-M Modifications in text not allowed
-b Binary mode
-l Lisp mode
-C Compatible with Vi: 'compatible'
-N Not fully Vi compatible: 'nocompatible'
-V[N][fname] Be verbose [level N] [log messages to fname]
-D Debugging mode
-n No swap file, use memory only
-r List swap files and exit
-r (with file name) Recover crashed session
-L Same as -r
-A start in Arabic mode
-H Start in Hebrew mode
-F Start in Farsi mode
-T Set terminal type to
-uUse instead of any .vimrc
-U Use instead of any .gvimrc
--noplugin Don't load plugin scripts
-p[N]Open N tab pages (default: one for each file)
-o[N]Open N windows (default: one for each file)
-O[N]Like -o but split vertically
+Start at end of file
+ Start at line
--cmd Execute before loading any vimrc file
-c Execute after loading the first file
-S Source file after loading the first file
-s Read Normal mode commands from file
-wAppend all typed commands to file
-WWrite all typed commands to file
-x Edit encrypted files
-X Do not connect to X server
--remote Edit in a Vim server if possible
--remote-silent Same, don't complain if there is no server
--remote-wait As --remote but wait for files to have been
edited
--remote-wait-silent Same, don't complain if there is no server
--remote-tab[-wait][-silent] As --remote but use tab page
per file
--remote-send Send to a Vim server and exit
--remote-expr Evaluate in a Vim server and print result
--serverlist List available Vim server names and exit
--servername Send to/become the Vim server
--startuptime Write startup timing messages to