annotate runtime/doc/os_dos.txt @ 27036:3e661b0cf500

Update runtime files Commit: https://github.com/vim/vim/commit/2f0936cb9a2eb026acac03e6a8fd0b2a5d97508b Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 8 21:51:59 2022 +0000 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Jan 2022 23:00:06 +0100
parents beff72446e2e
children f8116058ca76
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18879
af69c9335223 Vim 8.2 release
Bram Moolenaar <Bram@vim.org>
parents: 14421
diff changeset
1 *os_dos.txt* For Vim version 8.2. Last change: 2006 Mar 30
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 *dos* *DOS*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 This file documents the common particularities of the MS-DOS and Win32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 versions of Vim. Also see |os_win32.txt| and |os_msdos.txt|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 1. File locations |dos-locations|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 2. Using backslashes |dos-backslash|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 3. Standard mappings |dos-standard-mappings|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 4. Screen output and colors |dos-colors|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 5. File formats |dos-file-formats|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 6. :cd command |dos-:cd|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 7. Interrupting |dos-CTRL-Break|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 8. Temp files |dos-temp-files|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 9. Shell option default |dos-shell|
25068
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
20 10. PowerShell |dos-powershell|
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 1. File locations *dos-locations*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 If you keep the Vim executable in the directory that contains the help and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syntax subdirectories, there is no need to do anything special for Vim to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 work. No registry entries or environment variables need to be set. Just make
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 sure that the directory is in your search path, or use a shortcut on the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 desktop.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 Your vimrc files ("_vimrc" and "_gvimrc") are normally located one directory
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 up from the runtime files. If you want to put them somewhere else, set the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 environment variable $VIM to the directory where you keep them. Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 set VIM=C:\user\piet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 Will find "c:\user\piet\_vimrc".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 Note: This would only be needed when the computer is used by several people.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 Otherwise it's simpler to keep your _vimrc file in the default place.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 If you move the executable to another location, you also need to set the $VIM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 environment variable. The runtime files will be found in "$VIM/vim{version}".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 set VIM=E:\vim
19116
9b7f90e56753 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
43 Will find the version 8.2 runtime files in "e:\vim\vim82".
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 Note: This is _not_ recommended. The preferred way is to keep the executable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 in the runtime directory.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 If you move your executable AND want to put your "_vimrc" and "_gvimrc" files
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 somewhere else, you must set $VIM to where you vimrc files are, and set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 $VIMRUNTIME to the runtime files. Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 set VIM=C:\usr\piet
19116
9b7f90e56753 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
51 set VIMRUNTIME=E:\vim\vim82
9b7f90e56753 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
52 Will find "c:\user\piet\_vimrc" and the runtime files in "e:\vim\vim82".
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 See |$VIM| and |$VIMRUNTIME| for more information.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
19163
63beef1ca62c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
56 You can set environment variables for each user separately through the
63beef1ca62c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
57 System Properties dialog box. The steps to do that:
63beef1ca62c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
58 1. Type Windows Key + R to open the "Run" dialog box.
63beef1ca62c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
59 2. Enter "sysdm.cpl" and press the "OK" button. The "System Properties"
63beef1ca62c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
60 dialog box will open.
63beef1ca62c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
61 3. Select the "Advanced" tab and press the "Environment Variables..." button.
63beef1ca62c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
62 The "Environment Variables" dialog box will open.
63beef1ca62c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
63 4. Select an existing variable in the "User variables" list and press the
63beef1ca62c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
64 "Edit..." button to edit it. Or press the "New..." button to add a new
63beef1ca62c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
65 variable.
63beef1ca62c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
66 5. After you finished editing variables, press the "OK" button to save the
63beef1ca62c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
67 changes.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 2. Using backslashes *dos-backslash*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 Using backslashes in file names can be a problem. Vi halves the number of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 backslashes for some commands. Vim is a bit more tolerant and does not remove
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 backslashes from a file name, so ":e c:\foo\bar" works as expected. But when
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 a backslash occurs before a special character (space, comma, backslash, etc.),
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 Vim removes the backslash. Use slashes to avoid problems: ":e c:/foo/bar"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 works fine. Vim replaces the slashes with backslashes internally to avoid
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 problems with some MS-DOS programs and Win32 programs.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 When you prefer to use forward slashes, set the 'shellslash' option. Vim will
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 then replace backslashes with forward slashes when expanding file names. This
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 is especially useful when using a Unix-like 'shell'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 3. Standard mappings *dos-standard-mappings*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
87 The mappings for CTRL-PageUp and CTRL-PageDown have been removed, they now
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
88 jump to the next or previous tab page |<C-PageUp>| |<C-PageDown>|
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
90 If you want them to move to the first and last screen line you can use these
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 810
diff changeset
91 mappings:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 key key code Normal/Visual mode Insert mode ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 CTRL-PageUp <M-N><M-C-D> H <C-O>H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 CTRL-PageDown <M-N>v L$ <C-O>L<C-O>$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 Additionally, these keys are available for copy/cut/paste. In the Win32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 and DJGPP versions, they also use the clipboard.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 Shift-Insert paste text (from clipboard) *<S-Insert>*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 CTRL-Insert copy Visual text (to clipboard) *<C-Insert>*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 CTRL-Del cut Visual text (to clipboard) *<C-Del>*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 Shift-Del cut Visual text (to clipboard) *<S-Del>*
8148
f5da459c5698 commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents: 5294
diff changeset
104 CTRL-X cut Visual text (to clipboard)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 These mappings accomplish this (Win32 and DJGPP versions of Vim):
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 key key code Normal Visual Insert ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 Shift-Insert <M-N><M-T> "*P "-d"*P <C-R><C-O>*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 CTRL-Insert <M-N><M-U> "*y
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 Shift-Del <M-N><M-W> "*d
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 CTRL-Del <M-N><M-X> "*d
8148
f5da459c5698 commit https://github.com/vim/vim/commit/e0fa3742ead676a3074a10edadbc955e1a89153d
Christian Brabandt <cb@256bit.org>
parents: 5294
diff changeset
113 CTRL-X <C-X> "*d
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 Or these mappings (non-Win32 version of Vim):
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 key key code Normal Visual Insert ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 Shift-Insert <M-N><M-T> P "-dP <C-R><C-O>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 CTRL-Insert <M-N><M-U> y
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 Shift-Del <M-N><M-W> d
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 CTRL-Del <M-N><M-X> d
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 When the clipboard is supported, the "* register is used.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 4. Screen output and colors *dos-colors*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 The default output method for the screen is to use bios calls. This works
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 right away on most systems. You do not need ansi.sys. You can use ":mode" to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 set the current screen mode. See |:mode|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 To change the screen colors that Vim uses, you can use the |:highlight|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 command. The Normal highlight group specifies the colors Vim uses for normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 text. For example, to get grey text on a blue background: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 :hi Normal ctermbg=Blue ctermfg=grey
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 See |highlight-groups| for other groups that are available.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 A DOS console does not support attributes like bold and underlining. You can
667
9090f866cd57 updated for version 7.0197
vimboss
parents: 7
diff changeset
139 set the color used in five modes with nine terminal options. Note that this
9090f866cd57 updated for version 7.0197
vimboss
parents: 7
diff changeset
140 is not necessary since you can set the color directly with the ":highlight"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 command; these options are for backward compatibility with older Vim versions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 The |'highlight'| option specifies which of the five modes is used for which
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 action. >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 :set t_mr=^V^[\|xxm start of invert mode
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 :set t_md=^V^[\|xxm start of bold mode
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 :set t_me=^V^[\|xxm back to normal text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 :set t_so=^V^[\|xxm start of standout mode
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 :set t_se=^V^[\|xxm back to normal text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 :set t_us=^V^[\|xxm start of underline mode
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 :set t_ue=^V^[\|xxm back to normal text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 :set t_ZH=^V^[\|xxm start of italics mode
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 :set t_ZR=^V^[\|xxm back to normal text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 ^V is CTRL-V
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 ^[ is <Esc>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 You must replace xx with a decimal code, which is the foreground color number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 and background color number added together:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 COLOR FOREGROUND BACKGROUND ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 Black 0 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 DarkBlue 1 16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 DarkGreen 2 32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 DarkCyan 3 48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 DarkRed 4 64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 DarkMagenta 5 80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 Brown, DarkYellow 6 96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 LightGray 7 112
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 DarkGray 8 128 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 Blue, LightBlue 9 144 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 Green, LightGreen 10 160 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 Cyan, LightCyan 11 176 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 Red, LightRed 12 192 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 Magenta, LightMagenta 13 208 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 Yellow, LightYellow 14 224 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 White 15 240 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 * Depending on the display mode, the color codes above 128 may not be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 available, and code 128 will make the text blink.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 When you use 0, the color is reset to the one used when you started Vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 (usually 7, lightgray on black, but you can override this. If you have
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 overridden the default colors in a command prompt, you may need to adjust
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 some of the highlight colors in your vimrc---see below).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 This is the default for t_me.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 The defaults for the various highlight modes are:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 t_mr 112 reverse mode: Black text (0) on LightGray (112)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 t_md 15 bold mode: White text (15) on Black (0)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 t_me 0 normal mode (revert to default)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 t_so 31 standout mode: White (15) text on DarkBlue (16)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 t_se 0 standout mode end (revert to default)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 t_czh 225 italic mode: DarkBlue text (1) on Yellow (224)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 t_czr 0 italic mode end (revert to default)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 t_us 67 underline mode: DarkCyan text (3) on DarkRed (64)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 t_ue 0 underline mode end (revert to default)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 These colors were chosen because they also look good when using an inverted
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 display, but you can change them to your liking.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 :set t_mr=^V^[\|97m " start of invert mode: DarkBlue (1) on Brown (96)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 :set t_md=^V^[\|67m " start of bold mode: DarkCyan (3) on DarkRed (64)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 :set t_me=^V^[\|112m " back to normal mode: Black (0) on LightGray (112)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 :set t_so=^V^[\|37m " start of standout mode: DarkMagenta (5) on DarkGreen
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 (32)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 :set t_se=^V^[\|112m " back to normal mode: Black (0) on LightGray (112)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 5. File formats *dos-file-formats*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 If the 'fileformat' option is set to "dos" (which is the default), Vim accepts
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 a single <NL> or a <CR><NL> pair for end-of-line (<EOL>). When writing a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 file, Vim uses <CR><NL>. Thus, if you edit a file and write it, Vim replaces
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 <NL> with <CR><NL>.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 If the 'fileformat' option is set to "unix", Vim uses a single <NL> for <EOL>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 and shows <CR> as ^M.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 You can use Vim to replace <NL> with <CR><NL> by reading in any mode and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 writing in Dos mode (":se ff=dos").
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 You can use Vim to replace <CR><NL> with <NL> by reading in Dos mode and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 writing in Unix mode (":se ff=unix").
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 Vim sets 'fileformat' automatically when 'fileformats' is not empty (which is
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 the default), so you don't really have to worry about what you are doing.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 |'fileformat'| |'fileformats'|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 If you want to edit a script file or a binary file, you should set the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 'binary' option before loading the file. Script files and binary files may
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 contain single <NL> characters which Vim would replace with <CR><NL>. You can
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 set 'binary' automatically by starting Vim with the "-b" (binary) option.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 6. :cd command *dos-:cd*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 The ":cd" command recognizes the drive specifier and changes the current
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 drive. Use ":cd c:" to make drive C the active drive. Use ":cd d:\foo" to go
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 to the directory "foo" in the root of drive D. Vim also recognizes UNC names
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 if the system supports them; e.g., ":cd \\server\share\dir". |:cd|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 7. Interrupting *dos-CTRL-Break*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 Use CTRL-Break instead of CTRL-C to interrupt searches. Vim does not detect
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 the CTRL-C until it tries to read a key.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 8. Temp files *dos-temp-files*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 Only for the 16 bit and 32 bit DOS version:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 Vim puts temporary files (for filtering) in the first of these directories
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 that exists and in which Vim can create a file:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 $TMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 $TEMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 C:\TMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 C:\TEMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 current directory
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 For the Win32 version (both console and GUI):
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268 Vim uses standard Windows functions to obtain a temporary file name (for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269 filtering). The first of these directories that exists and in which Vim can
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 create a file is used:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271 $TMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 $TEMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 current directory
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276 9. Shell option default *dos-shell*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278 The default for the 'sh' ('shell') option is "command.com" on Windows 95 and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279 "cmd.exe" on Windows NT. If SHELL is defined, Vim uses SHELL instead, and if
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
280 SHELL is not defined but COMSPEC is, Vim uses COMSPEC. Vim starts external
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281 commands with "<shell> /c <command_name>". Typing CTRL-Z starts a new command
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282 subshell. Return to Vim with "exit". |'shell'| |CTRL-Z|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
284 If you are running a third-party shell, you may need to set the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285 |'shellcmdflag'| ('shcf') and |'shellquote'| ('shq') or |'shellxquote'|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286 ('sxq') options. Unfortunately, this also depends on the version of Vim used.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287 For example, with the MKS Korn shell or with bash, the values of the options
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288 should be:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
289
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290 DOS 16 bit DOS 32 bit Win32 ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
291 'shellcmdflag' -c -c -c
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292 'shellquote' "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293 'shellxquote' "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295 For Dos 16 bit this starts the shell as:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296 <shell> -c "command name" >file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297 For Win32 as:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298 <shell> -c "command name >file"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299 For DOS 32 bit, DJGPP does this internally somehow.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
300
25068
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
301 When starting up, if Vim does not recognise a standard Windows shell it checks
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
302 for the presence of "sh" anywhere in the 'shell' option. If it is present,
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
303 Vim sets the 'shellcmdflag' and 'shellquote' or 'shellxquote' options will be
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
304 set as described above.
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
305
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
306 ==============================================================================
25084
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
307 10. PowerShell *dos-powershell* *dos-pwsh*
25068
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
308
25084
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
309 Vim supports PowerShell Desktop and PowerShell Core. PowerShell Desktop is
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
310 the version of PowerShell that is installed with Windows, while PowerShell
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
311 Core is a separate downloadable version that works cross-platform. To see
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
312 which version you are using then enter the following in a PowerShell prompt -
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
313 $PSVersionTable.PSEdition
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
314
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
315 If 'shell' includes "powershell" in the filename at startup then VIM sets
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
316 'shellcmdflag', 'shellxquote', 'shellpipe', and 'shellredir' options to the
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
317 following values:
25068
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
318
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
319 'shellcmdflag' -Command
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
320 'shellxquote' "
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
321 'shellpipe' 2>&1 | Out-File -Encoding default
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
322 'shellredir' 2>&1 | Out-File -Encoding default
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
323
25084
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
324 If 'shell' includes "pwsh" in the filename at startup then VIM sets
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
325 'shellcmdflag', 'shellxquote', 'shellpipe', and 'shellredir' options to the
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
326 following values:
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
327
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
328 'shellcmdflag' -c
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
329 'shellxquote' "
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
330 'shellpipe' >%s 2>&1
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
331 'shellredir' >%s 2>&1
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
332
25068
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
333 If you find that PowerShell commands are taking a long time to run then try
25084
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
334 with "-NoProfile" at the beginning of the 'shellcmdflag'. Note this will
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
335 prevent any PowerShell environment setup by the profile from taking place.
25068
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
336
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
337 If you have problems running PowerShell scripts through the 'shell' then try
25084
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
338 with "-ExecutionPolicy RemoteSigned -Command" at the beginning of
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
339 'shellcmdflag'. See online Windows documentation for more information on
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
340 PowerShell Execution Policy settings.
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
341
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
342 See |option-backslash| about including spaces in 'shellcmdflag' when using
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
343 multiple flags.
25068
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
344
27036
3e661b0cf500 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25084
diff changeset
345 The 'shellpipe' and 'shellredir' option values re-encode the UTF-16LE output
25084
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
346 from PowerShell Desktop to your currently configured console codepage. The
25068
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
347 output can be forced into a different encoding by changing "default" to one of
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
348 the following:
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
349
27036
3e661b0cf500 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25084
diff changeset
350 unicode - UTF-16LE (default output from PowerShell 5.1)
25068
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
351 bigendianunicode - UTF-16
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
352 utf8 - UTF-8
25084
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
353 utf7 - UTF-7 (no BOM)
25068
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
354 utf32 - UTF-32
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
355 ascii - 7-bit ASCII character set
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
356 default - System's active code page (typically ANSI)
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
357 oem - System's current OEM code page
0ce24f734615 patch 8.2.3071: shell options are not set properly for PowerShell
Bram Moolenaar <Bram@vim.org>
parents: 19163
diff changeset
358
27036
3e661b0cf500 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25084
diff changeset
359 Note The above multi-byte Unicode encodings include a leading BOM unless
25084
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
360 otherwise indicated.
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
361
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
362 By default PowerShell Core's output is UTF-8 encoded without a BOM. If you
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
363 want to force the output of PowerShell Core into a different encoding then set
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
364 'shellredir' and 'shellpipe' to "2>&1 | Out-File -Encoding encoding" where
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
365 encoding is one of the following:
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
366
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
367 ascii - 7-bit ASCII character set
27036
3e661b0cf500 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25084
diff changeset
368 bigendianunicode - UTF-16BE
3e661b0cf500 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25084
diff changeset
369 bigendianutf32 - UTF-32BE
25084
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
370 oem - System's current OEM code page
27036
3e661b0cf500 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25084
diff changeset
371 unicode - UTF-16LE
25084
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
372 utf7 - UTF-7
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
373 utf8 - UTF-8
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
374 utf8BOM - UTF-8, with BOM
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
375 utf8NoBOM - UTF-8, no BOM (default output from PowerShell Core)
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
376 utf32 - UTF-32
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
377
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
378 Since PowerShell Core 6.2, the Encoding parameter also supports specifying a
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
379 numeric ID of a registered code page (-Encoding 1251) or string names of
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
380 registered code pages (-Encoding "windows-1251"). The .NET documentation for
beff72446e2e patch 8.2.3079: Powershell core not supported by default
Bram Moolenaar <Bram@vim.org>
parents: 25068
diff changeset
381 Encoding.CodePage has more information
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
382
14421
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13963
diff changeset
383 vim:tw=78:ts=8:noet:ft=help:norl: