/usr/share/vim/vim82/doc
NameSizeModeActions
arabic.txt122040644editdlrm
autocmd.txt743140644editdlrm
builtin.txt3890750644editdlrm
change.txt792140644editdlrm
channel.txt503870644editdlrm
cmdline.txt501300644editdlrm
debug.txt68960644editdlrm
debugger.txt54430644editdlrm
develop.txt228610644editdlrm
diff.txt175150644editdlrm
digraph.txt620820644editdlrm
editing.txt753190644editdlrm
eval.txt1782820644editdlrm
farsi.txt5230644editdlrm
filetype.txt279980644editdlrm
fold.txt241390644editdlrm
ft_ada.txt182460644editdlrm
ft_ps1.txt21870644editdlrm
ft_raku.txt41830644editdlrm
ft_rust.txt95960644editdlrm
ft_sql.txt306970644editdlrm
gui.txt530760644editdlrm
gui_w32.txt191170644editdlrm
gui_x11.txt299060644editdlrm
hangulin.txt5980644editdlrm
hebrew.txt56660644editdlrm
help.txt90980644editdlrm
help.txt.vim-tiny14310644editdlrm
helphelp.txt159330644editdlrm
howto.txt29160644editdlrm
if_cscop.txt193250644editdlrm
if_lua.txt185460644editdlrm
if_mzsch.txt119410644editdlrm
if_ole.txt73610644editdlrm
if_perl.txt112810644editdlrm
if_pyth.txt386440644editdlrm
if_ruby.txt85160644editdlrm
if_sniff.txt2710644editdlrm
if_tcl.txt229410644editdlrm
indent.txt419020644editdlrm
index.txt811250644editdlrm
insert.txt875680644editdlrm
intro.txt389340644editdlrm
map.txt744640644editdlrm
mbyte.txt596400644editdlrm
message.txt316710644editdlrm
mlang.txt81870644editdlrm
motion.txt518910644editdlrm
netbeans.txt379820644editdlrm
options.txt4012540644editdlrm
os_390.txt47490644editdlrm
os_amiga.txt54660644editdlrm
os_beos.txt2930644editdlrm
os_dos.txt154960644editdlrm
os_haiku.txt84960644editdlrm
os_mac.txt68560644editdlrm
os_mint.txt3910644editdlrm
os_msdos.txt5230644editdlrm
os_os2.txt2990644editdlrm
os_qnx.txt40710644editdlrm
os_risc.txt3280644editdlrm
os_unix.txt26030644editdlrm
os_vms.txt329030644editdlrm
os_win32.txt144040644editdlrm
pattern.txt629490644editdlrm
pi_getscript.txt210820644editdlrm
pi_gzip.txt12940644editdlrm
pi_logipat.txt41960644editdlrm
pi_netrw.txt1818240644editdlrm
pi_paren.txt22740644editdlrm
pi_spec.txt41270644editdlrm
pi_tar.txt72470644editdlrm
pi_vimball.txt118590644editdlrm
pi_zip.txt74910644editdlrm
popup.txt396890644editdlrm
print.txt312090644editdlrm
quickfix.txt833310644editdlrm
quickref.txt724920644editdlrm
quotes.txt127480644editdlrm
README.Debian3240644editdlrm
recover.txt107200644editdlrm
remote.txt84200644editdlrm
repeat.txt435650644editdlrm
rileft.txt49380644editdlrm
russian.txt30240644editdlrm
scroll.txt137810644editdlrm
sign.txt268700644editdlrm
spell.txt640950644editdlrm
sponsor.txt68030644editdlrm
starting.txt735990644editdlrm
syntax.txt2297950644editdlrm
tabpage.txt172480644editdlrm
tags3626700644editdlrm
tags.vim-tiny300644editdlrm
tagsrch.txt402780644editdlrm
term.txt498220644editdlrm
terminal.txt570980644editdlrm
testing.txt166780644editdlrm
textprop.txt163950644editdlrm
tips.txt210890644editdlrm
todo.txt3071470644editdlrm
uganda.txt140280644editdlrm
undo.txt165840644editdlrm
usr_01.txt70810644editdlrm
usr_02.txt242290644editdlrm
usr_03.txt238720644editdlrm
usr_04.txt191310644editdlrm
usr_05.txt270230644editdlrm
usr_06.txt106380644editdlrm
usr_07.txt159950644editdlrm
usr_08.txt193790644editdlrm
usr_09.txt115020644editdlrm
usr_10.txt292000644editdlrm
usr_11.txt130250644editdlrm
usr_12.txt134330644editdlrm
usr_20.txt137330644editdlrm
usr_21.txt184560644editdlrm
usr_22.txt149990644editdlrm
usr_23.txt127440644editdlrm
usr_24.txt208270644editdlrm
usr_25.txt191760644editdlrm
usr_26.txt82590644editdlrm
usr_27.txt177090644editdlrm
usr_28.txt160200644editdlrm
usr_29.txt201210644editdlrm
usr_30.txt226580644editdlrm
usr_31.txt103990644editdlrm
usr_32.txt53780644editdlrm
usr_40.txt231950644editdlrm
usr_41.txt956260644editdlrm
usr_42.txt138530644editdlrm
usr_43.txt74090644editdlrm
usr_44.txt289480644editdlrm
usr_45.txt176880644editdlrm
usr_46.txt70960644editdlrm
usr_90.txt168360644editdlrm
usr_toc.txt95050644editdlrm
various.txt314830644editdlrm
version4.txt139110644editdlrm
version5.txt3085330644editdlrm
version6.txt5769420644editdlrm
version7.txt6747030644editdlrm
version8.txt19404660644editdlrm
vim9.txt686120644editdlrm
visual.txt218460644editdlrm
vi_diff.txt574280644editdlrm
windows.txt558980644editdlrm
workshop.txt3710644editdlrm
Edit: /usr/share/vim/vim82/doc/os_dos.txt (15496B)
*os_dos.txt* For Vim version 8.2. Last change: 2006 Mar 30 VIM REFERENCE MANUAL by Bram Moolenaar *dos* *DOS* This file documents the common particularities of the MS-DOS and Win32 versions of Vim. Also see |os_win32.txt| and |os_msdos.txt|. 1. File locations |dos-locations| 2. Using backslashes |dos-backslash| 3. Standard mappings |dos-standard-mappings| 4. Screen output and colors |dos-colors| 5. File formats |dos-file-formats| 6. :cd command |dos-:cd| 7. Interrupting |dos-CTRL-Break| 8. Temp files |dos-temp-files| 9. Shell option default |dos-shell| 10. PowerShell |dos-powershell| ============================================================================== 1. File locations *dos-locations* If you keep the Vim executable in the directory that contains the help and syntax subdirectories, there is no need to do anything special for Vim to work. No registry entries or environment variables need to be set. Just make sure that the directory is in your search path, or use a shortcut on the desktop. Your vimrc files ("_vimrc" and "_gvimrc") are normally located one directory up from the runtime files. If you want to put them somewhere else, set the environment variable $VIM to the directory where you keep them. Example: > set VIM=C:\user\piet Will find "c:\user\piet\_vimrc". Note: This would only be needed when the computer is used by several people. Otherwise it's simpler to keep your _vimrc file in the default place. If you move the executable to another location, you also need to set the $VIM environment variable. The runtime files will be found in "$VIM/vim{version}". Example: > set VIM=E:\vim Will find the version 8.2 runtime files in "e:\vim\vim82". Note: This is _not_ recommended. The preferred way is to keep the executable in the runtime directory. If you move your executable AND want to put your "_vimrc" and "_gvimrc" files somewhere else, you must set $VIM to where you vimrc files are, and set $VIMRUNTIME to the runtime files. Example: > set VIM=C:\usr\piet set VIMRUNTIME=E:\vim\vim82 Will find "c:\user\piet\_vimrc" and the runtime files in "e:\vim\vim82". See |$VIM| and |$VIMRUNTIME| for more information. You can set environment variables for each user separately through the System Properties dialog box. The steps to do that: 1. Type Windows Key + R to open the "Run" dialog box. 2. Enter "sysdm.cpl" and press the "OK" button. The "System Properties" dialog box will open. 3. Select the "Advanced" tab and press the "Environment Variables..." button. The "Environment Variables" dialog box will open. 4. Select an existing variable in the "User variables" list and press the "Edit..." button to edit it. Or press the "New..." button to add a new variable. 5. After you finished editing variables, press the "OK" button to save the changes. ============================================================================== 2. Using backslashes *dos-backslash* Using backslashes in file names can be a problem. Vi halves the number of backslashes for some commands. Vim is a bit more tolerant and does not remove backslashes from a file name, so ":e c:\foo\bar" works as expected. But when a backslash occurs before a special character (space, comma, backslash, etc.), Vim removes the backslash. Use slashes to avoid problems: ":e c:/foo/bar" works fine. Vim replaces the slashes with backslashes internally to avoid problems with some MS-DOS programs and Win32 programs. When you prefer to use forward slashes, set the 'shellslash' option. Vim will then replace backslashes with forward slashes when expanding file names. This is especially useful when using a Unix-like 'shell'. ============================================================================== 3. Standard mappings *dos-standard-mappings* The mappings for CTRL-PageUp and CTRL-PageDown have been removed, they now jump to the next or previous tab page || || If you want them to move to the first and last screen line you can use these mappings: key key code Normal/Visual mode Insert mode ~ CTRL-PageUp H H CTRL-PageDown v L$ L$ Additionally, these keys are available for copy/cut/paste. In the Win32 and DJGPP versions, they also use the clipboard. Shift-Insert paste text (from clipboard) ** CTRL-Insert copy Visual text (to clipboard) ** CTRL-Del cut Visual text (to clipboard) ** Shift-Del cut Visual text (to clipboard) ** CTRL-X cut Visual text (to clipboard) These mappings accomplish this (Win32 and DJGPP versions of Vim): key key code Normal Visual Insert ~ Shift-Insert "*P "-d"*P * CTRL-Insert "*y Shift-Del "*d CTRL-Del "*d CTRL-X "*d Or these mappings (non-Win32 version of Vim): key key code Normal Visual Insert ~ Shift-Insert P "-dP " CTRL-Insert y Shift-Del d CTRL-Del d When the clipboard is supported, the "* register is used. ============================================================================== 4. Screen output and colors *dos-colors* The default output method for the screen is to use bios calls. This works right away on most systems. You do not need ansi.sys. You can use ":mode" to set the current screen mode. See |:mode|. To change the screen colors that Vim uses, you can use the |:highlight| command. The Normal highlight group specifies the colors Vim uses for normal text. For example, to get grey text on a blue background: > :hi Normal ctermbg=Blue ctermfg=grey See |highlight-groups| for other groups that are available. A DOS console does not support attributes like bold and underlining. You can set the color used in five modes with nine terminal options. Note that this is not necessary since you can set the color directly with the ":highlight" command; these options are for backward compatibility with older Vim versions. The |'highlight'| option specifies which of the five modes is used for which action. > :set t_mr=^V^[\|xxm start of invert mode :set t_md=^V^[\|xxm start of bold mode :set t_me=^V^[\|xxm back to normal text :set t_so=^V^[\|xxm start of standout mode :set t_se=^V^[\|xxm back to normal text :set t_us=^V^[\|xxm start of underline mode :set t_ue=^V^[\|xxm back to normal text :set t_ZH=^V^[\|xxm start of italics mode :set t_ZR=^V^[\|xxm back to normal text ^V is CTRL-V ^[ is You must replace xx with a decimal code, which is the foreground color number and background color number added together: COLOR FOREGROUND BACKGROUND ~ Black 0 0 DarkBlue 1 16 DarkGreen 2 32 DarkCyan 3 48 DarkRed 4 64 DarkMagenta 5 80 Brown, DarkYellow 6 96 LightGray 7 112 DarkGray 8 128 * Blue, LightBlue 9 144 * Green, LightGreen 10 160 * Cyan, LightCyan 11 176 * Red, LightRed 12 192 * Magenta, LightMagenta 13 208 * Yellow, LightYellow 14 224 * White 15 240 * * Depending on the display mode, the color codes above 128 may not be available, and code 128 will make the text blink. When you use 0, the color is reset to the one used when you started Vim (usually 7, lightgray on black, but you can override this. If you have overridden the default colors in a command prompt, you may need to adjust some of the highlight colors in your vimrc---see below). This is the default for t_me. The defaults for the various highlight modes are: t_mr 112 reverse mode: Black text (0) on LightGray (112) t_md 15 bold mode: White text (15) on Black (0) t_me 0 normal mode (revert to default) t_so 31 standout mode: White (15) text on DarkBlue (16) t_se 0 standout mode end (revert to default) t_czh 225 italic mode: DarkBlue text (1) on Yellow (224) t_czr 0 italic mode end (revert to default) t_us 67 underline mode: DarkCyan text (3) on DarkRed (64) t_ue 0 underline mode end (revert to default) These colors were chosen because they also look good when using an inverted display, but you can change them to your liking. Example: > :set t_mr=^V^[\|97m " start of invert mode: DarkBlue (1) on Brown (96) :set t_md=^V^[\|67m " start of bold mode: DarkCyan (3) on DarkRed (64) :set t_me=^V^[\|112m " back to normal mode: Black (0) on LightGray (112) :set t_so=^V^[\|37m " start of standout mode: DarkMagenta (5) on DarkGreen (32) :set t_se=^V^[\|112m " back to normal mode: Black (0) on LightGray (112) ============================================================================== 5. File formats *dos-file-formats* If the 'fileformat' option is set to "dos" (which is the default), Vim accepts a single or a pair for end-of-line (). When writing a file, Vim uses . Thus, if you edit a file and write it, Vim replaces with . If the 'fileformat' option is set to "unix", Vim uses a single for and shows as ^M. You can use Vim to replace with by reading in any mode and writing in Dos mode (":se ff=dos"). You can use Vim to replace with by reading in Dos mode and writing in Unix mode (":se ff=unix"). Vim sets 'fileformat' automatically when 'fileformats' is not empty (which is the default), so you don't really have to worry about what you are doing. |'fileformat'| |'fileformats'| If you want to edit a script file or a binary file, you should set the 'binary' option before loading the file. Script files and binary files may contain single characters which Vim would replace with . You can set 'binary' automatically by starting Vim with the "-b" (binary) option. ============================================================================== 6. :cd command *dos-:cd* The ":cd" command recognizes the drive specifier and changes the current drive. Use ":cd c:" to make drive C the active drive. Use ":cd d:\foo" to go to the directory "foo" in the root of drive D. Vim also recognizes UNC names if the system supports them; e.g., ":cd \\server\share\dir". |:cd| ============================================================================== 7. Interrupting *dos-CTRL-Break* Use CTRL-Break instead of CTRL-C to interrupt searches. Vim does not detect the CTRL-C until it tries to read a key. ============================================================================== 8. Temp files *dos-temp-files* Only for the 16 bit and 32 bit DOS version: Vim puts temporary files (for filtering) in the first of these directories that exists and in which Vim can create a file: $TMP $TEMP C:\TMP C:\TEMP current directory For the Win32 version (both console and GUI): Vim uses standard Windows functions to obtain a temporary file name (for filtering). The first of these directories that exists and in which Vim can create a file is used: $TMP $TEMP current directory ============================================================================== 9. Shell option default *dos-shell* The default for the 'sh' ('shell') option is "command.com" on Windows 95 and "cmd.exe" on Windows NT. If SHELL is defined, Vim uses SHELL instead, and if SHELL is not defined but COMSPEC is, Vim uses COMSPEC. Vim starts external commands with " /c ". Typing CTRL-Z starts a new command subshell. Return to Vim with "exit". |'shell'| |CTRL-Z| If you are running a third-party shell, you may need to set the |'shellcmdflag'| ('shcf') and |'shellquote'| ('shq') or |'shellxquote'| ('sxq') options. Unfortunately, this also depends on the version of Vim used. For example, with the MKS Korn shell or with bash, the values of the options should be: DOS 16 bit DOS 32 bit Win32 ~ 'shellcmdflag' -c -c -c 'shellquote' " 'shellxquote' " For Dos 16 bit this starts the shell as: -c "command name" >file For Win32 as: -c "command name >file" For DOS 32 bit, DJGPP does this internally somehow. When starting up, if Vim does not recognise a standard Windows shell it checks for the presence of "sh" anywhere in the 'shell' option. If it is present, Vim sets the 'shellcmdflag' and 'shellquote' or 'shellxquote' options will be set as described above. ============================================================================== 10. PowerShell *dos-powershell* *dos-pwsh* Vim supports PowerShell Desktop and PowerShell Core. PowerShell Desktop is the version of PowerShell that is installed with Windows, while PowerShell Core is a separate downloadable version that works cross-platform. To see which version you are using then enter the following in a PowerShell prompt - $PSVersionTable.PSEdition If 'shell' includes "powershell" in the filename at startup then VIM sets 'shellcmdflag', 'shellxquote', 'shellpipe', and 'shellredir' options to the following values: 'shellcmdflag' -Command 'shellxquote' " 'shellpipe' 2>&1 | Out-File -Encoding default 'shellredir' 2>&1 | Out-File -Encoding default If 'shell' includes "pwsh" in the filename at startup then VIM sets 'shellcmdflag', 'shellxquote', 'shellpipe', and 'shellredir' options to the following values: 'shellcmdflag' -c 'shellxquote' " 'shellpipe' >%s 2>&1 'shellredir' >%s 2>&1 If you find that PowerShell commands are taking a long time to run then try with "-NoProfile" at the beginning of the 'shellcmdflag'. Note this will prevent any PowerShell environment setup by the profile from taking place. If you have problems running PowerShell scripts through the 'shell' then try with "-ExecutionPolicy RemoteSigned -Command" at the beginning of 'shellcmdflag'. See online Windows documentation for more information on PowerShell Execution Policy settings. See |option-backslash| about including spaces in 'shellcmdflag' when using multiple flags. The 'shellpipe' and 'shellredir' option values re-encode the UTF-16le output from PowerShell Desktop to your currently configured console codepage. The output can be forced into a different encoding by changing "default" to one of the following: unicode - UTF-16le (default output from PowerShell 5.1) bigendianunicode - UTF-16 utf8 - UTF-8 utf7 - UTF-7 (no BOM) utf32 - UTF-32 ascii - 7-bit ASCII character set default - System's active code page (typically ANSI) oem - System's current OEM code page Note The abovce multi-byte Unicode encodings include a leading BOM unless otherwise indicated. By default PowerShell Core's output is UTF-8 encoded without a BOM. If you want to force the output of PowerShell Core into a different encoding then set 'shellredir' and 'shellpipe' to "2>&1 | Out-File -Encoding encoding" where encoding is one of the following: ascii - 7-bit ASCII character set bigendianunicode - UTF-16be bigendianutf32 - UTF-32be oem - System's current OEM code page unicode - UTF-16le utf7 - UTF-7 utf8 - UTF-8 utf8BOM - UTF-8, with BOM utf8NoBOM - UTF-8, no BOM (default output from PowerShell Core) utf32 - UTF-32 Since PowerShell Core 6.2, the Encoding parameter also supports specifying a numeric ID of a registered code page (-Encoding 1251) or string names of registered code pages (-Encoding "windows-1251"). The .NET documentation for Encoding.CodePage has more information vim:tw=78:ts=8:noet:ft=help:norl: