blob: dbfcc413e0b5ff3887ae21c31e59cea27f17e3ec [file] [log] [blame]
Bram Moolenaar82d1c332010-08-09 20:16:32 +02001*gui_w16.txt* For Vim version 7.3f. Last change: 2005 Mar 29
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3
4 VIM REFERENCE MANUAL by Bram Moolenaar
5
6
7Vim's Graphical User Interface *gui-w16* *win16-gui*
8
91. Starting the GUI |win16-start|
102. Vim as default editor |win16-default-editor|
113. Using the clipboard |win16-clipboard|
124. Shell Commands |win16-shell|
135. Special colors |win16-colors|
146. Windows dialogs & browsers |win16-dialogs|
157. Various |win16-various|
16
17Other 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.
21
22{Vi does not have a Windows GUI}
23
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000024The Win16 version of Vim will run on Windows 3.1 or later. It has not been
Bram Moolenaar071d4272004-06-13 20:20:40 +000025tested on 3.0, it probably won't work without being recompiled and
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000026modified. (But you really should upgrade to 3.11 anyway. :)
Bram Moolenaar071d4272004-06-13 20:20:40 +000027
28In most respects it behaves identically to the Win32 GUI version, including
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000029having a flat-style toolbar(!). The chief differences:
Bram Moolenaar071d4272004-06-13 20:20:40 +000030
311) Bold/Italic text is not available, to speed up repaint/reduce resource
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000032 usage. (You can re-instate this by undefining MSWIN16_FASTTEXT.)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000332) No tearoff menu emulation.
343) No OLE interface.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000354) No long filename support (of course).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000365) No tooltips on toolbar buttons - instead they produce command-line tips
37 like menu items do.
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000386) Line length limited to 32767 characters (like 16-bit DOS version).
Bram Moolenaar071d4272004-06-13 20:20:40 +000039
40
41==============================================================================
421. Starting the GUI *win16-start*
43
44The Win16 GUI version of Vim will always start the GUI, no matter how you
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000045start it or what it's called. There is no 'console' version as such, but you
Bram Moolenaar071d4272004-06-13 20:20:40 +000046can use one of the DOS versions in a DOS box.
47
48The Win16 GUI has an extra menu item: "Window/Select Font". It brings up the
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000049standard Windows font selector. Note that bold and italic fonts are not
Bram Moolenaar071d4272004-06-13 20:20:40 +000050supported in an attempt to maximize GDI drawing speed.
51
52Setting the menu height doesn't work for the Win16 GUI.
53
54 *win16-maximized*
55If you want Vim to start with a maximized window, add this command to your
56vimrc or gvimrc file: >
57 au GUIEnter * simalt ~x
58<
59
60There is a specific version of gvim.exe that runs under the Win32s subsystem
61of Windows 3.1 or 3.11. See |win32s|.
62
63==============================================================================
642. Vim as default editor *win16-default-editor*
65
66To set Vim as the default editor for a file type you can use File Manager's
67"Associate" feature.
68
69When you open a file in Vim by double clicking it, Vim changes to that
70file's directory.
71
72See also |notepad|.
73
74==============================================================================
753. Using the clipboard *win16-clipboard*
76
77Windows has a clipboard, where you can copy text to, and paste text from. Vim
78supports this in several ways.
79The clipboard works in the same way as the Win32 version: see |gui-clipboard|.
80
81==============================================================================
824. Shell Commands *win16-shell*
83
84Vim spawns a DOS window for external commands, to make it possible to run any
Bram Moolenaar402d2fe2005-04-15 21:00:38 +000085DOS command. The window uses the _default.pif settings.
Bram Moolenaar071d4272004-06-13 20:20:40 +000086
87 *win16-!start*
88Normally, Vim waits for a command to complete before continuing (this makes
89sense for most shell commands which produce output for Vim to use). If you
90want Vim to start a program and return immediately, you can use the following
91syntax:
92 :!start {command}
93This may only work for a Windows program though.
94Don't forget that you must tell Windows 3.1x to keep executing a DOS command
95in the background while you switch back to Vim.
96
97==============================================================================
985. Special colors *win16-colors*
99
100On Win16, the normal DOS colors can be used. See |dos-colors|.
101
102Additionally the system configured colors can also be used. These are known
103by the names Sys_XXX, where XXX is the appropriate system color name, from the
104following list (see the Win32 documentation for full descriptions). Case is
105ignored.
106
107Sys_BTNFace Sys_BTNShadow Sys_ActiveBorder
108Sys_ActiveCaption Sys_AppWorkspace Sys_Background
109Sys_BTNText Sys_CaptionText Sys_GrayText
110Sys_Highlight Sys_HighlightText Sys_InactiveBorder
111Sys_InactiveCaption Sys_InactiveCaptionText Sys_Menu
112Sys_MenuText Sys_ScrollBar Sys_Window
113Sys_WindowFrame Sys_WindowText
114
115Probably 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
120
121These extra colors are also available:
122Gray, Grey, LightYellow, SeaGreen, Orange, Purple, SlateBlue, Violet,
123
124
125See also |rgb.txt|.
126
127==============================================================================
128 *win16-dialogs*
1296. Windows dialogs & browsers
130
131The Win16 GUI can use familiar Windows components for some operations, as well
132as the traditional interface shared with the console version.
133
134
1356.1 Dialogs
136
137The dialogs displayed by the "confirm" family (i.e. the 'confirm' option,
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000138|:confirm| command and |confirm()| function) are GUI-based rather than the
Bram Moolenaar071d4272004-06-13 20:20:40 +0000139console-based ones used by other versions. There is no option to change this.
140
141
1426.2 File Browsers
143
144When prepending ":browse" before file editing commands, a file requester is
145used to allow you to select an existing file. See |:browse|.
146
147
148==============================================================================
1497. Various *win16-various*
150
151 *win16-printing*
152The "File/Print" menu uses Notepad to print the current buffer. This is a bit
153clumsy, but it's portable. If you want something else, you can define your
154own print command. For example, you could look for the 16-bit version of
155PrintFile. See $VIMRUNTIME/menu.vim for how it works by default.
156
157Using this should also work: >
158 :w >>prn
159
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000160Vim supports a number of standard MS Windows features. Some of these are
Bram Moolenaar071d4272004-06-13 20:20:40 +0000161detailed elsewhere: see |'mouse'|, |win32-hidden-menus|.
162Also see |:simalt|
163
164 *win16-drag-n-drop*
165You can drag and drop one or more files into the vim window, where they will
166be opened as normal. If you hold down Shift while doing this, Vim changes to
167the (first) dropped file's directory. If you hold Ctrl, Vim will always split
168a new window for the file. Otherwise it's only done if the current buffer has
169been changed.
170You can also drop a directory's icon, but rather than open all files in the
171directory (which wouldn't usually be what you want) Vim instead changes to
172that directory and begins a new file.
173If Vim happens to be editing a command line, the names of the dropped files
174and directories will be inserted at the cursor. This allows you to use these
175names with any Ex command.
176
177 *win16-truetype*
178It is recommended that you use a raster font and not a TrueType
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000179fixed-pitch font. E.g. use Courier, not Courier New. This is not just
Bram Moolenaar071d4272004-06-13 20:20:40 +0000180to use less resources but because there are subtle bugs in the
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000181handling of fixed-pitch TrueType in Win3.1x. In particular, when you move
Bram Moolenaar071d4272004-06-13 20:20:40 +0000182a block cursor over a pipe character '|', the cursor is drawn in the wrong
Bram Moolenaar402d2fe2005-04-15 21:00:38 +0000183size and bits get left behind. This is a bug in the Win3.1x GDI, it doesn't
Bram Moolenaar071d4272004-06-13 20:20:40 +0000184happen if you run the exe under 95/NT.
185
186 vim:tw=78:sw=4:ts=8:ft=help:norl: