annotate runtime/doc/gui_w16.txt @ 1916:70a5e723eea2 v7.2.213

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