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