On 24/10/12 14:57, Marvin Renich wrote:
* Tony Mechelynck <antoine.mechely...@gmail.com> [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 <terminal> Set terminal type to <terminal>
-u <vimrc> Use <vimrc> instead of any .vimrc
-U <gvimrc> Use <gvimrc> 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
+<lnum> Start at line <lnum>
--cmd <command> Execute <command> before loading any vimrc file
-c <command> Execute <command> after loading the first file
-S <session> Source file <session> after loading the first file
-s <scriptin> Read Normal mode commands from file <scriptin>
-w <scriptout> Append all typed commands to file <scriptout>
-W <scriptout> Write all typed commands to file <scriptout>
-x Edit encrypted files
-X Do not connect to X server
--remote <files> Edit <files> in a Vim server if possible
--remote-silent <files> Same, don't complain if there is no server
--remote-wait <files> As --remote but wait for files to have been
edited
--remote-wait-silent <files> Same, don't complain if there is no server
--remote-tab[-wait][-silent] <files> As --remote but use tab page
per file
--remote-send <keys> Send <keys> to a Vim server and exit
--remote-expr <expr> Evaluate <expr> in a Vim server and print result
--serverlist List available Vim server names and exit
--servername <name> Send to/become the Vim server <name>
--startuptime <file> Write startup timing messages to <file>
-i <viminfo> Use <viminfo> instead of .viminfo
-h or --help Print Help (this message) and exit
--version Print version information and exit
Arguments recognised by gvim (GTK+ version):
-font <font> Use <font> for normal text (also: -fn)
-geometry <geom> Use <geom> for initial geometry (also: -geom)
-reverse Use reverse video (also: -rv)
-display <display> Run vim on <display> (also: --display)
--role <role> Set a unique role to identify the main window
--socketid <xid> Open Vim inside another GTK widget
--echo-wid Make gvim echo the Window ID on stdout
Usage: vim [OPTION...]
--load-modules=MODULE1,MODULE2,... Dynamic modules to load
Help options
-?, --help Show this help message
--usage Display brief usage message
GTK+
--gdk-debug=FLAGS Gdk debugging flags to set
--gdk-no-debug=FLAGS Gdk debugging flags to unset
--display=DISPLAY X display to use
--screen=SCREEN X screen to use
--sync Make X calls synchronous
--name=NAME Program name as used by
the window manager
--class=CLASS Program class as used by
the window manager
--gtk-debug=FLAGS Gtk+ debugging flags to set
--gtk-no-debug=FLAGS Gtk+ debugging flags to unset
--g-fatal-warnings Make all warnings fatal
--gtk-module=MODULE Load an additional Gtk module
Bonobo activation Support
--oaf-ior-fd=FD File descriptor to print
IOR on
--oaf-activate-iid=IID IID to activate
--oaf-private Prevent registering of
server with OAF
GNOME Library
--disable-sound Disable sound server usage
--enable-sound Enable sound server usage
--espeaker=HOSTNAME:PORT Host:port on which the
sound server to use is running
--version 2.32.1
Session management
--sm-client-id=ID Specify session management ID
--sm-config-prefix=PREFIX Specify prefix of saved
configuration
--sm-disable Disable connection to
session manager
GNOME GUI Library
--disable-crash-dialog Disable Crash Dialog
I would be inclined to say that giving E233 when no display is available
is a bug, and should be fixed rather than documented, however I'm not
familiar enough with how the GNOME-specific options work to be sure.
If the problem is in Vim code, it should be fixed. But I suspect it is
in GNOME code, and I wouldn't expect GNOME to behave "sensibly" when no
X server is available.
...Marvin
Best regards,
Tony.
--
God rest ye CS students now,
Let nothing you dismay.
The VAX is down and won't be up,
Until the first of May.
The program that was due this morn,
Won't be postponed, they say.
Oh, tidings of comfort and joy,
Comfort and joy,
Oh, tidings of comfort and joy.
The bearings on the drum are gone,
The disk is wobbling, too.
We've found a bug in Lisp, and Algol
Can't tell false from true.
And now we find that we can't get
At Berkeley's 4.2.
(chorus)
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php