Mercurial > vim
comparison runtime/doc/os_win32.txt @ 10264:c036c0f636d5 v8.0.0029
commit https://github.com/vim/vim/commit/cea912af725c54f4727a0565e31661f6b29c6bb1
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 12 14:20:24 2016 +0200
patch 8.0.0029
Problem: Code for MS-Windows is complicated because of the exceptions for
old systems.
Solution: Drop support for MS-Windows older than Windows XP. (Ken Takata)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 12 Oct 2016 14:30:05 +0200 |
parents | 9f48eab77d62 |
children | a3ea65af63cf |
comparison
equal
deleted
inserted
replaced
10263:b758a787983a | 10264:c036c0f636d5 |
---|---|
1 *os_win32.txt* For Vim version 8.0. Last change: 2016 Aug 28 | 1 *os_win32.txt* For Vim version 8.0. Last change: 2016 Oct 12 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by George Reilly | 4 VIM REFERENCE MANUAL by George Reilly |
5 | 5 |
6 | 6 |
7 *win32* *Win32* *MS-Windows* | 7 *win32* *Win32* *MS-Windows* |
8 This file documents the idiosyncrasies of the Win32 version of Vim. | 8 This file documents the idiosyncrasies of the Win32 version of Vim. |
9 | 9 |
10 The Win32 version of Vim works on Windows NT, 95, 98, ME, XP, Vista and | 10 The Win32 version of Vim works on Windows XP, Vista, 7, 8 and 10. There are |
11 Windows 7. There are both console and GUI versions. | 11 both console and GUI versions. |
12 | 12 |
13 The 32 bit version also runs on 64 bit MS-Windows systems. | 13 The 32 bit version also runs on 64 bit MS-Windows systems. |
14 | |
15 There is GUI version for use in the Win32s subsystem in Windows 3.1[1]. You | |
16 can also use the 32-bit DOS version of Vim instead. See |os_msdos.txt|. | |
17 | 14 |
18 1. Known problems |win32-problems| | 15 1. Known problems |win32-problems| |
19 2. Startup |win32-startup| | 16 2. Startup |win32-startup| |
20 3. Restore screen contents |win32-restore| | 17 3. Restore screen contents |win32-restore| |
21 4. Using the mouse |win32-mouse| | 18 4. Using the mouse |win32-mouse| |
22 5. Running under Windows 3.1 |win32-win3.1| | 19 5. Running under Windows 95 |win32-win95| |
23 6. Win32 mini FAQ |win32-faq| | 20 6. Running under Windows 3.1 |win32-win3.1| |
21 7. Win32 mini FAQ |win32-faq| | |
24 | 22 |
25 Additionally, there are a number of common Win32 and DOS items: | 23 Additionally, there are a number of common Win32 and DOS items: |
26 File locations |dos-locations| | 24 File locations |dos-locations| |
27 Using backslashes |dos-backslash| | 25 Using backslashes |dos-backslash| |
28 Standard mappings |dos-standard-mappings| | 26 Standard mappings |dos-standard-mappings| |
41 The GUI version was made by George V. Reilly and Robert Webb. | 39 The GUI version was made by George V. Reilly and Robert Webb. |
42 | 40 |
43 For compiling see "src/INSTALLpc.txt". *win32-compiling* | 41 For compiling see "src/INSTALLpc.txt". *win32-compiling* |
44 | 42 |
45 ============================================================================== | 43 ============================================================================== |
46 1. Known problems *windows95* *win32-problems* | 44 1. Known problems *win32-problems* |
47 | |
48 There are a few known problems with running in a console on Windows 95. As | |
49 far as we know, this is the same in Windows 98 and Windows ME. | |
50 | |
51 Comments from somebody working at Microsoft: "Win95 console support has always | |
52 been and will always be flaky". | |
53 1. Dead key support doesn't work. | |
54 2. Resizing the window with ":set columns=nn lines=nn" works, but executing | |
55 external commands MAY CAUSE THE SYSTEM TO HANG OR CRASH. | |
56 3. Screen updating is slow, unless you change 'columns' or 'lines' to a | |
57 non-DOS value. But then the second problem applies! | |
58 | |
59 If this bothers you, use the 32 bit MS-DOS version or the Win32 GUI version. | |
60 | 45 |
61 When doing file name completion, Vim also finds matches for the short file | 46 When doing file name completion, Vim also finds matches for the short file |
62 name. But Vim will still find and use the corresponding long file name. For | 47 name. But Vim will still find and use the corresponding long file name. For |
63 example, if you have the long file name "this_is_a_test" with the short file | 48 example, if you have the long file name "this_is_a_test" with the short file |
64 name "this_i~1", the command ":e *1" will start editing "this_is_a_test". | 49 name "this_i~1", the command ":e *1" will start editing "this_is_a_test". |
139 | 124 |
140 When the mouse doesn't work, try disabling the "Quick Edit Mode" feature of | 125 When the mouse doesn't work, try disabling the "Quick Edit Mode" feature of |
141 the console. | 126 the console. |
142 | 127 |
143 ============================================================================== | 128 ============================================================================== |
144 5. Running under Windows 3.1 *win32-win3.1* | 129 5. Running under Windows 95 *win32-win95* |
145 | 130 *windows95* *windows98* *windowsme* |
146 *win32s* *windows-3.1* | 131 Windows 95/98/ME support was removed in patch 8.0.0029 If you want to use it |
132 you will need to get a version older than that. | |
133 | |
134 ============================================================================== | |
135 6. Running under Windows 3.1 *win32-win3.1* | |
136 | |
137 *win32s* *windows-3.1* *gui-w32s* | |
147 There was a special version of Gvim that runs under Windows 3.1 and 3.11. | 138 There was a special version of Gvim that runs under Windows 3.1 and 3.11. |
148 Support was removed in patch 7.4.1363. | 139 Support was removed in patch 7.4.1363. |
149 | 140 |
150 ============================================================================== | 141 ============================================================================== |
151 6. Win32 mini FAQ *win32-faq* | 142 7. Win32 mini FAQ *win32-faq* |
152 | |
153 Q. Why does the Win32 version of Vim update the screen so slowly on Windows 95? | |
154 A. The support for Win32 console mode applications is very buggy in Win95. | |
155 For some unknown reason, the screen updates very slowly when Vim is run at | |
156 one of the standard resolutions (80x25, 80x43, or 80x50) and the 16-bit DOS | |
157 version updates the screen much more quickly than the Win32 version. | |
158 However, if the screen is set to some other resolution, such as by ":set | |
159 columns=100" or ":set lines=40", screen updating becomes about as fast as | |
160 it is with the 16-bit version. | |
161 | |
162 WARNING: Changing 'columns' may make Windows 95 crash while updating the | |
163 window (complaints --> Microsoft). Since this mostly works, this has not | |
164 been disabled, but be careful with changing 'columns'. | |
165 | |
166 Changing the screen resolution makes updates faster, but it brings | |
167 additional problems. External commands (e.g., ":!dir") can cause Vim to | |
168 freeze when the screen is set to a non-standard resolution, particularly | |
169 when 'columns' is not equal to 80. It is not possible for Vim to reliably | |
170 set the screen resolution back to the value it had upon startup before | |
171 running external commands, so if you change the number of 'lines' or | |
172 'columns', be very, very careful. In fact, Vim will not allow you to | |
173 execute external commands when 'columns' is not equal to 80, because it is | |
174 so likely to freeze up afterwards. | |
175 | |
176 None of the above applies on Windows NT. Screen updates are fast, no | |
177 matter how many 'lines' or 'columns' the window has, and external commands | |
178 do not cause Vim to freeze. | |
179 | |
180 Q. So if the Win32 version updates the screen so slowly on Windows 95 and the | |
181 16-bit DOS version updates the screen quickly, why would I want to run the | |
182 Win32 version? | |
183 A. Firstly, the Win32 version isn't that slow, especially when the screen is | |
184 set to some non-standard number of 'lines' or 'columns'. Secondly, the | |
185 16-bit DOS version has some severe limitations: It can't do big changes and | |
186 it doesn't know about long file names. The Win32 version doesn't have these | |
187 limitations and it's faster overall (the same is true for the 32-bit DJGPP | |
188 DOS version of Vim). The Win32 version is smarter about handling the | |
189 screen, the mouse, and the keyboard than the DJGPP version is. | |
190 | |
191 Q. And what about the 16-bit DOS version versus the Win32 version on NT? | |
192 A. There are no good reasons to run the 16-bit DOS version on NT. The Win32 | |
193 version updates the screen just as fast as the 16-bit version does when | |
194 running on NT. All of the above disadvantages apply. Finally, DOS | |
195 applications can take a long time to start up and will run more slowly. On | |
196 non-Intel NT platforms, the DOS version is almost unusably slow, because it | |
197 runs on top of an 80x86 emulator. | |
198 | 143 |
199 Q. How do I change the font? | 144 Q. How do I change the font? |
200 A. In the GUI version, you can use the 'guifont' option. Example: > | 145 A. In the GUI version, you can use the 'guifont' option. Example: > |
201 :set guifont=Lucida_Console:h15:cDEFAULT | 146 :set guifont=Lucida_Console:h15:cDEFAULT |
202 < In the console version, you need to set the font of the console itself. | 147 < In the console version, you need to set the font of the console itself. |
203 You cannot do this from within Vim. | 148 You cannot do this from within Vim. |
204 | |
205 Q. When I change the size of the console window with ':set lines=xx' or | |
206 similar, the font changes! (Win95) | |
207 A. You have the console font set to 'Auto' in Vim's (or your MS-DOS prompt's) | |
208 properties. This makes W95 guess (badly!) what font is best. Set an explicit | |
209 font instead. | |
210 | |
211 Q. Why can't I paste into Vim when running Windows 95? | |
212 A. In the properties dialog box for the MS-DOS window, go to "MS-DOS | |
213 Prompt/Misc/Fast pasting" and make sure that it is NOT checked. You should | |
214 also do ":set paste" in Vim to avoid unexpected effects. |'paste'| | |
215 | |
216 Q. How do I type dead keys on Windows 95, in the console version? | |
217 (A dead key is an accent key, such as acute, grave, or umlaut, that doesn't | |
218 produce a character by itself, but when followed by another key, produces | |
219 an accented character, such as a-acute, e-grave, u-umlaut, n-tilde, and so | |
220 on. Very useful for most European languages. English-language keyboard | |
221 layouts don't use dead keys, as far as we know.) | |
222 A. You don't. The console mode input routines simply do not work correctly in | |
223 Windows 95, and I have not been able to work around them. In the words | |
224 of a senior developer at Microsoft: | |
225 Win95 console support has always been and will always be flaky. | |
226 | |
227 The flakiness is unavoidable because we are stuck between the world of | |
228 MS-DOS keyboard TSRs like KEYB (which wants to cook the data; | |
229 important for international) and the world of Win32. | |
230 | |
231 So keys that don't "exist" in MS-DOS land (like dead keys) have a | |
232 very tenuous existence in Win32 console land. Keys that act | |
233 differently between MS-DOS land and Win32 console land (like | |
234 capslock) will act flaky. | |
235 | |
236 Don't even _mention_ the problems with multiple language keyboard | |
237 layouts... | |
238 | |
239 You may be able to fashion some sort of workaround with the digraphs | |
240 mechanism. |digraphs| | |
241 | |
242 The best solution is to use the Win32 GUI version gvim.exe. Alternatively, | |
243 you can try one of the DOS versions of Vim where dead keys reportedly do | |
244 work. | |
245 | 149 |
246 Q. How do I type dead keys on Windows NT? | 150 Q. How do I type dead keys on Windows NT? |
247 A. Dead keys work on NT 3.51. Just type them as you would in any other | 151 A. Dead keys work on NT 3.51. Just type them as you would in any other |
248 application. | 152 application. |
249 On NT 4.0, you need to make sure that the default locale (set in the | 153 On NT 4.0, you need to make sure that the default locale (set in the |
347 :!start /min notepad | 251 :!start /min notepad |
348 :!start /b notepad | 252 :!start /b notepad |
349 < The first command runs notepad minimized and the second one runs it | 253 < The first command runs notepad minimized and the second one runs it |
350 normally. | 254 normally. |
351 | 255 |
352 Q. I'm using Win32s, and when I try to run an external command like "make", | |
353 Vim doesn't wait for it to finish! Help! | |
354 A. The problem is that a 32-bit application (Vim) can't get notification from | |
355 Windows that a 16-bit application (your DOS session) has finished. Vim | |
356 includes a work-around for this, but you must set up your DOS commands to | |
357 run in a window, not full-screen. Unfortunately the default when you | |
358 install Windows is full-screen. To change this: | |
359 1) Start PIF editor (in the Main program group). | |
360 2) Open the file "_DEFAULT.PIF" in your Windows directory. | |
361 3) Changes the display option from "Full Screen" to "Windowed". | |
362 4) Save and exit. | |
363 | |
364 To test, start Vim and type > | |
365 :!dir C:\<CR>". | |
366 < You should see a DOS box window appear briefly with the directory listing. | |
367 | |
368 Q. I use Vim under Win32s and NT. In NT, I can define the console to default to | |
369 50 lines, so that I get a 80x50 shell when I ':sh'. Can I do the same in | |
370 W3.1x, or am I stuck with 80x25? | |
371 A. Edit SYSTEM.INI and add 'ScreenLines=50' to the [NonWindowsApp] section. DOS | |
372 prompts and external DOS commands will now run in a 50-line window. | |
373 | |
374 *windows-icon* | 256 *windows-icon* |
375 Q. I don't like the Vim icon, can I change it? | 257 Q. I don't like the Vim icon, can I change it? |
376 A. Yes, place your favorite icon in bitmaps/vim.ico in a directory of | 258 A. Yes, place your favorite icon in bitmaps/vim.ico in a directory of |
377 'runtimepath'. For example ~/vimfiles/bitmaps/vim.ico. | 259 'runtimepath'. For example ~/vimfiles/bitmaps/vim.ico. |
378 | 260 |