1*gui_w16.txt* For Vim version 7.3. Last change: 2005 Mar 29 2 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 24The Win16 version of Vim will run on Windows 3.1 or later. It has not been 25tested on 3.0, it probably won't work without being recompiled and 26modified. (But you really should upgrade to 3.11 anyway. :) 27 28In most respects it behaves identically to the Win32 GUI version, including 29having a flat-style toolbar(!). The chief differences: 30 311) Bold/Italic text is not available, to speed up repaint/reduce resource 32 usage. (You can re-instate this by undefining MSWIN16_FASTTEXT.) 332) No tearoff menu emulation. 343) No OLE interface. 354) No long filename support (of course). 365) No tooltips on toolbar buttons - instead they produce command-line tips 37 like menu items do. 386) Line length limited to 32767 characters (like 16-bit DOS version). 39 40 41============================================================================== 421. Starting the GUI *win16-start* 43 44The Win16 GUI version of Vim will always start the GUI, no matter how you 45start it or what it's called. There is no 'console' version as such, but you 46can 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 49standard Windows font selector. Note that bold and italic fonts are not 50supported 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 85DOS command. The window uses the _default.pif settings. 86 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, 138|:confirm| command and |confirm()| function) are GUI-based rather than the 139console-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 160Vim supports a number of standard MS Windows features. Some of these are 161detailed 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 179fixed-pitch font. E.g. use Courier, not Courier New. This is not just 180to use less resources but because there are subtle bugs in the 181handling of fixed-pitch TrueType in Win3.1x. In particular, when you move 182a block cursor over a pipe character '|', the cursor is drawn in the wrong 183size and bits get left behind. This is a bug in the Win3.1x GDI, it doesn't 184happen if you run the exe under 95/NT. 185 186 vim:tw=78:sw=4:ts=8:ft=help:norl: 187