Install vim73
[msysgit/mtrensch.git] / share / vim / vim73 / doc / gui_w16.txt
bloba98f0d039f909d8a76ea2d3d5df3611a0576a1f3
1 *gui_w16.txt*   For Vim version 7.3.  Last change: 2005 Mar 29
4                   VIM REFERENCE MANUAL    by Bram Moolenaar
7 Vim's Graphical User Interface                          *gui-w16* *win16-gui*
9 1. Starting the GUI             |win16-start|
10 2. Vim as default editor        |win16-default-editor|
11 3. Using the clipboard          |win16-clipboard|
12 4. Shell Commands               |win16-shell|
13 5. Special colors               |win16-colors|
14 6. Windows dialogs & browsers   |win16-dialogs|
15 7. Various                      |win16-various|
17 Other relevant documentation:
18 |gui.txt|       For generic items of the GUI.
19 |os_msdos.txt|  For items common to DOS and Windows.
20 |gui_w32.txt|   Some items here are also applicable to the Win16 version.
22 {Vi does not have a Windows GUI}
24 The Win16 version of Vim will run on Windows 3.1 or later.  It has not been
25 tested on 3.0, it probably won't work without being recompiled and
26 modified.  (But you really should upgrade to 3.11 anyway. :)
28 In most respects it behaves identically to the Win32 GUI version, including
29 having a flat-style toolbar(!).  The chief differences:
31 1) Bold/Italic text is not available, to speed up repaint/reduce resource
32    usage.  (You can re-instate this by undefining MSWIN16_FASTTEXT.)
33 2) No tearoff menu emulation.
34 3) No OLE interface.
35 4) No long filename support (of course).
36 5) No tooltips on toolbar buttons - instead they produce command-line tips
37    like menu items do.
38 6) Line length limited to 32767 characters (like 16-bit DOS version).
41 ==============================================================================
42 1. Starting the GUI                                     *win16-start*
44 The Win16 GUI version of Vim will always start the GUI, no matter how you
45 start it or what it's called.  There is no 'console' version as such, but you
46 can use one of the DOS versions in a DOS box.
48 The Win16 GUI has an extra menu item:  "Window/Select Font".  It brings up the
49 standard Windows font selector.  Note that bold and italic fonts are not
50 supported in an attempt to maximize GDI drawing speed.
52 Setting the menu height doesn't work for the Win16 GUI.
54                                                         *win16-maximized*
55 If you want Vim to start with a maximized window, add this command to your
56 vimrc or gvimrc file: >
57         au GUIEnter * simalt ~x
60 There is a specific version of gvim.exe that runs under the Win32s subsystem
61 of Windows 3.1 or 3.11.  See |win32s|.
63 ==============================================================================
64 2. Vim as default editor                                *win16-default-editor*
66 To set Vim as the default editor for a file type you can use File Manager's
67 "Associate" feature.
69 When you open a file in Vim by double clicking it, Vim changes to that
70 file's directory.
72 See also |notepad|.
74 ==============================================================================
75 3. Using the clipboard                                  *win16-clipboard*
77 Windows has a clipboard, where you can copy text to, and paste text from.  Vim
78 supports this in several ways.
79 The clipboard works in the same way as the Win32 version: see |gui-clipboard|.
81 ==============================================================================
82 4. Shell Commands                                       *win16-shell*
84 Vim spawns a DOS window for external commands, to make it possible to run any
85 DOS command.  The window uses the _default.pif settings.
87                                                         *win16-!start*
88 Normally, Vim waits for a command to complete before continuing (this makes
89 sense for most shell commands which produce output for Vim to use).  If you
90 want Vim to start a program and return immediately, you can use the following
91 syntax:
92         :!start {command}
93 This may only work for a Windows program though.
94 Don't forget that you must tell Windows 3.1x to keep executing a DOS command
95 in the background while you switch back to Vim.
97 ==============================================================================
98 5. Special colors                                       *win16-colors*
100 On Win16, the normal DOS colors can be used.  See |dos-colors|.
102 Additionally the system configured colors can also be used.  These are known
103 by the names Sys_XXX, where XXX is the appropriate system color name, from the
104 following list (see the Win32 documentation for full descriptions).  Case is
105 ignored.
107 Sys_BTNFace             Sys_BTNShadow                   Sys_ActiveBorder
108 Sys_ActiveCaption       Sys_AppWorkspace                Sys_Background
109 Sys_BTNText             Sys_CaptionText                 Sys_GrayText
110 Sys_Highlight           Sys_HighlightText               Sys_InactiveBorder
111 Sys_InactiveCaption     Sys_InactiveCaptionText         Sys_Menu
112 Sys_MenuText            Sys_ScrollBar                   Sys_Window
113 Sys_WindowFrame         Sys_WindowText
115 Probably the most useful values are
116         Sys_Window          Normal window background
117         Sys_WindowText      Normal window text
118         Sys_Highlight       Highlighted background
119         Sys_HighlightText   Highlighted text
121 These extra colors are also available:
122 Gray, Grey, LightYellow, SeaGreen, Orange, Purple, SlateBlue, Violet,
125 See also |rgb.txt|.
127 ==============================================================================
128                                                 *win16-dialogs*
129 6. Windows dialogs & browsers
131 The Win16 GUI can use familiar Windows components for some operations, as well
132 as the traditional interface shared with the console version.
135 6.1 Dialogs
137 The dialogs displayed by the "confirm" family (i.e. the 'confirm' option,
138 |:confirm| command and |confirm()| function) are GUI-based rather than the
139 console-based ones used by other versions.  There is no option to change this.
142 6.2 File Browsers
144 When prepending ":browse" before file editing commands, a file requester is
145 used to allow you to select an existing file.  See |:browse|.
148 ==============================================================================
149 7. Various                                              *win16-various*
151                                                         *win16-printing*
152 The "File/Print" menu uses Notepad to print the current buffer.  This is a bit
153 clumsy, but it's portable.  If you want something else, you can define your
154 own print command.  For example, you could look for the 16-bit version of
155 PrintFile.  See $VIMRUNTIME/menu.vim for how it works by default.
157 Using this should also work: >
158         :w >>prn
160 Vim supports a number of standard MS Windows features.  Some of these are
161 detailed elsewhere: see |'mouse'|, |win32-hidden-menus|.
162 Also see |:simalt|
164                                                         *win16-drag-n-drop*
165 You can drag and drop one or more files into the vim window, where they will
166 be opened as normal.  If you hold down Shift while doing this, Vim changes to
167 the (first) dropped file's directory.  If you hold Ctrl, Vim will always split
168 a new window for the file.  Otherwise it's only done if the current buffer has
169 been changed.
170 You can also drop a directory's icon, but rather than open all files in the
171 directory (which wouldn't usually be what you want) Vim instead changes to
172 that directory and begins a new file.
173 If Vim happens to be editing a command line, the names of the dropped files
174 and directories will be inserted at the cursor.  This allows you to use these
175 names with any Ex command.
177                                                         *win16-truetype*
178 It is recommended that you use a raster font and not a TrueType
179 fixed-pitch font.  E.g. use Courier, not Courier New.  This is not just
180 to use less resources but because there are subtle bugs in the
181 handling of fixed-pitch TrueType in Win3.1x.  In particular, when you move
182 a block cursor over a pipe character '|', the cursor is drawn in the wrong
183 size and bits get left behind.  This is a bug in the Win3.1x GDI, it doesn't
184 happen if you run the exe under 95/NT.
186  vim:tw=78:sw=4:ts=8:ft=help:norl: