代码拉取完成,页面将自动刷新
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>os_dos - Vim Documentation</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim8.0">
<meta name="syntax" content="help">
<meta name="settings" content="no_pre,use_css,expand_tabs">
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="jquery.min.js" type="text/javascript"></script>
<script src="mark-current-page.js" type="text/javascript"></script>
</head>
<body>
<header>
<div class="header">
<a href="http://vim-jp.org/">vim-jp</a>
/ <a href="http://vim-jp.org/vimdoc-en/">vimdoc-en</a>
/ os_dos<br />
<a name="top"></a><h1>os_dos - Vim Documentation</h1>
<a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
<span class="CurrentLanguage">English</span>
</span>
</div>
</header>
<nav>
<dl>
<dt>BASIC</dt>
<dd><ul>
<li><a href="quickref.html">quickref</a></li>
<li><a href="sponsor.html">sponsor</a></li>
</ul></dd>
<dt>USER MANUAL</dt>
<dd><ul>
<li><a href="usr_toc.html">usr_toc</a></li>
</ul></dd>
<dt>Getting Started</dt>
<dd><ul>
<li><a href="usr_01.html">usr_01</a></li>
<li><a href="usr_02.html">usr_02</a></li>
<li><a href="usr_03.html">usr_03</a></li>
<li><a href="usr_04.html">usr_04</a></li>
<li><a href="usr_05.html">usr_05</a></li>
<li><a href="usr_06.html">usr_06</a></li>
<li><a href="usr_07.html">usr_07</a></li>
<li><a href="usr_08.html">usr_08</a></li>
<li><a href="usr_09.html">usr_09</a></li>
<li><a href="usr_10.html">usr_10</a></li>
<li><a href="usr_11.html">usr_11</a></li>
<li><a href="usr_12.html">usr_12</a></li>
</ul></dd>
<dt>Editing Effectively</dt>
<dd><ul>
<li><a href="usr_20.html">usr_20</a></li>
<li><a href="usr_21.html">usr_21</a></li>
<li><a href="usr_22.html">usr_22</a></li>
<li><a href="usr_23.html">usr_23</a></li>
<li><a href="usr_24.html">usr_24</a></li>
<li><a href="usr_25.html">usr_25</a></li>
<li><a href="usr_26.html">usr_26</a></li>
<li><a href="usr_27.html">usr_27</a></li>
<li><a href="usr_28.html">usr_28</a></li>
<li><a href="usr_29.html">usr_29</a></li>
<li><a href="usr_30.html">usr_30</a></li>
<li><a href="usr_31.html">usr_31</a></li>
<li><a href="usr_32.html">usr_32</a></li>
</ul></dd>
<dt>Tuning Vim</dt>
<dd><ul>
<li><a href="usr_40.html">usr_40</a></li>
<li><a href="usr_41.html">usr_41</a></li>
<li><a href="usr_42.html">usr_42</a></li>
<li><a href="usr_43.html">usr_43</a></li>
<li><a href="usr_44.html">usr_44</a></li>
<li><a href="usr_45.html">usr_45</a></li>
</ul></dd>
<dt>Making Vim Run</dt>
<dd><ul>
<li><a href="usr_90.html">usr_90</a></li>
</ul></dd>
<dt>General subjects</dt>
<dd><ul>
<li><a href="intro.html">intro</a></li>
<li><a href="index.html">help</a></li>
<li><a href="helphelp.html">helphelp</a></li>
<li><a href="vimindex.html">index</a></li>
<li><a href="tags.html">tags</a></li>
<li><a href="howto.html">howto</a></li>
<li><a href="tips.html">tips</a></li>
<li><a href="message.html">message</a></li>
<li><a href="quotes.html">quotes</a></li>
<li><a href="todo.html">todo</a></li>
<li><a href="debug.html">debug</a></li>
<li><a href="develop.html">develop</a></li>
<li><a href="uganda.html">uganda</a></li>
</ul></dd>
<dt>Basic editing</dt>
<dd><ul>
<li><a href="starting.html">starting</a></li>
<li><a href="editing.html">editing</a></li>
<li><a href="motion.html">motion</a></li>
<li><a href="scroll.html">scroll</a></li>
<li><a href="insert.html">insert</a></li>
<li><a href="change.html">change</a></li>
<li><a href="indent.html">indent</a></li>
<li><a href="undo.html">undo</a></li>
<li><a href="repeat.html">repeat</a></li>
<li><a href="visual.html">visual</a></li>
<li><a href="various.html">various</a></li>
<li><a href="recover.html">recover</a></li>
</ul></dd>
<dt>Advanced editing</dt>
<dd><ul>
<li><a href="cmdline.html">cmdline</a></li>
<li><a href="options.html">options</a></li>
<li><a href="pattern.html">pattern</a></li>
<li><a href="map.html">map</a></li>
<li><a href="tagsrch.html">tagsrch</a></li>
<li><a href="quickfix.html">quickfix</a></li>
<li><a href="windows.html">windows</a></li>
<li><a href="tabpage.html">tabpage</a></li>
<li><a href="syntax.html">syntax</a></li>
<li><a href="spell.html">spell</a></li>
<li><a href="diff.html">diff</a></li>
<li><a href="autocmd.html">autocmd</a></li>
<li><a href="filetype.html">filetype</a></li>
<li><a href="eval.html">eval</a></li>
<li><a href="channel.html">channel</a></li>
<li><a href="fold.html">fold</a></li>
</ul></dd>
<dt>Special issues</dt>
<dd><ul>
<li><a href="print.html">print</a></li>
<li><a href="remote.html">remote</a></li>
<li><a href="term.html">term</a></li>
<li><a href="digraph.html">digraph</a></li>
<li><a href="mbyte.html">mbyte</a></li>
<li><a href="mlang.html">mlang</a></li>
<li><a href="arabic.html">arabic</a></li>
<li><a href="farsi.html">farsi</a></li>
<li><a href="hebrew.html">hebrew</a></li>
<li><a href="russian.html">russian</a></li>
<li><a href="ft_ada.html">ft_ada</a></li>
<li><a href="ft_sql.html">ft_sql</a></li>
<li><a href="hangulin.html">hangulin</a></li>
<li><a href="rileft.html">rileft</a></li>
</ul></dd>
<dt>GUI</dt>
<dd><ul>
<li><a href="gui.html">gui</a></li>
<li><a href="gui_w32.html">gui_w32</a></li>
<li><a href="gui_x11.html">gui_x11</a></li>
</ul></dd>
<dt>Interfaces</dt>
<dd><ul>
<li><a href="if_cscop.html">if_cscop</a></li>
<li><a href="if_lua.html">if_lua</a></li>
<li><a href="if_mzsch.html">if_mzsch</a></li>
<li><a href="if_perl.html">if_perl</a></li>
<li><a href="if_pyth.html">if_pyth</a></li>
<li><a href="if_tcl.html">if_tcl</a></li>
<li><a href="if_ole.html">if_ole</a></li>
<li><a href="if_ruby.html">if_ruby</a></li>
<li><a href="debugger.html">debugger</a></li>
<li><a href="workshop.html">workshop</a></li>
<li><a href="netbeans.html">netbeans</a></li>
<li><a href="sign.html">sign</a></li>
</ul></dd>
<dt>Versions</dt>
<dd><ul>
<li><a href="vi_diff.html">vi_diff</a></li>
<li><a href="version4.html">version4</a></li>
<li><a href="version5.html">version5</a></li>
<li><a href="version6.html">version6</a></li>
<li><a href="version7.html">version7</a></li>
<li><a href="version8.html">version8</a></li>
</ul></dd>
<dt>Remarks about specific systems</dt>
<dd><ul>
<li><a href="os_390.html">os_390</a></li>
<li><a href="os_amiga.html">os_amiga</a></li>
<li><a href="os_beos.html">os_beos</a></li>
<li><a href="os_dos.html">os_dos</a></li>
<li><a href="os_mac.html">os_mac</a></li>
<li><a href="os_mint.html">os_mint</a></li>
<li><a href="os_msdos.html">os_msdos</a></li>
<li><a href="os_os2.html">os_os2</a></li>
<li><a href="os_qnx.html">os_qnx</a></li>
<li><a href="os_risc.html">os_risc</a></li>
<li><a href="os_unix.html">os_unix</a></li>
<li><a href="os_vms.html">os_vms</a></li>
<li><a href="os_win32.html">os_win32</a></li>
</ul></dd>
<dt>Standard plugins</dt>
<dd><ul>
<li><a href="pi_getscript.html">pi_getscript</a></li>
<li><a href="pi_gzip.html">pi_gzip</a></li>
<li><a href="pi_logipat.html">pi_logipat</a></li>
<li><a href="pi_netrw.html">pi_netrw</a></li>
<li><a href="pi_paren.html">pi_paren</a></li>
<li><a href="pi_tar.html">pi_tar</a></li>
<li><a href="pi_vimball.html">pi_vimball</a></li>
<li><a href="pi_zip.html">pi_zip</a></li>
</ul></dd>
<dt>Filetype plugins</dt>
<dd><ul>
<li><a href="pi_spec.html">pi_spec</a></li>
</ul></dd>
<dt>Others</dt>
<dd><ul>
<li><a href="vim_faq.html">vim_faq</a></li>
</ul></dd>
</dl>
</nav>
<article class="Vimdoc VimdocJa">
<div id='vimCodeElement'>
<a class="Constant" href="os_dos.html" name="os_dos.txt">os_dos.txt</a> For <span class="Identifier">Vim version 8.0.</span> Last change: 2006 Mar 30<br>
<br>
<br>
<span class="Identifier">VIM REFERENCE MANUAL by Bram Moolenaar</span><br>
<br>
<br>
<a class="Constant" href="os_dos.html#dos" name="dos">dos</a> <a class="Constant" href="os_dos.html#DOS" name="DOS">DOS</a><br>
This file documents the common particularities of the MS-DOS and Win32<br>
versions of Vim. Also see <a class="Identifier" href="os_win32.html">os_win32.txt</a> and <a class="Identifier" href="os_msdos.html">os_msdos.txt</a>.<br>
<br>
1. File locations <a class="Identifier" href="os_dos.html#dos-locations">dos-locations</a><br>
2. Using backslashes <a class="Identifier" href="os_dos.html#dos-backslash">dos-backslash</a><br>
3. Standard mappings <a class="Identifier" href="os_dos.html#dos-standard-mappings">dos-standard-mappings</a><br>
4. Screen output and colors <a class="Identifier" href="os_dos.html#dos-colors">dos-colors</a><br>
5. File formats <a class="Identifier" href="os_dos.html#dos-file-formats">dos-file-formats</a><br>
6. :cd command <a class="Identifier" href="os_dos.html#dos-:cd">dos-:cd</a><br>
7. Interrupting <a class="Identifier" href="os_dos.html#dos-CTRL-Break">dos-CTRL-Break</a><br>
8. Temp files <a class="Identifier" href="os_dos.html#dos-temp-files">dos-temp-files</a><br>
9. Shell option default <a class="Identifier" href="os_dos.html#dos-shell">dos-shell</a><br>
<br>
<span class="PreProc">==============================================================================</span><br>
1. File locations <a class="Constant" href="os_dos.html#dos-locations" name="dos-locations">dos-locations</a><br>
<br>
If you keep the Vim executable in the directory that contains the help and<br>
syntax subdirectories, there is no need to do anything special for Vim to<br>
work. No registry entries or environment variables need to be set. Just make<br>
sure that the directory is in your search path, or use a shortcut on the<br>
desktop.<br>
<br>
Your vimrc files ("_vimrc" and "_gvimrc") are normally located one directory<br>
up from the runtime files. If you want to put them somewhere else, set the<br>
environment variable $VIM to the directory where you keep them. Example:<br>
<div class="helpExample"> set VIM=C:\user\piet</div>
Will find "c:\user\piet\_vimrc".<br>
<span class="Todo">Note</span>: This would only be needed when the computer is used by several people.<br>
Otherwise it's simpler to keep your _vimrc file in the default place.<br>
<br>
If you move the executable to another location, you also need to set the $VIM<br>
environment variable. The runtime files will be found in "$VIM/vim<span class="Special">{version}</span>".<br>
Example:<br>
<div class="helpExample"> set VIM=E:\vim</div>
Will find the version 5.4 runtime files in "e:\vim\vim54".<br>
<span class="Todo">Note</span>: This is _not_ recommended. The preferred way is to keep the executable<br>
in the runtime directory.<br>
<br>
If you move your executable AND want to put your "_vimrc" and "_gvimrc" files<br>
somewhere else, you must set $VIM to where you vimrc files are, and set<br>
$VIMRUNTIME to the runtime files. Example:<br>
<div class="helpExample"> set VIM=C:\usr\piet<br>
set VIMRUNTIME=E:\vim\vim54</div>
Will find "c:\user\piet\_vimrc" and the runtime files in "e:\vim\vim54".<br>
<br>
See <a class="Identifier" href="starting.html#$VIM">$VIM</a> and <a class="Identifier" href="starting.html#$VIMRUNTIME">$VIMRUNTIME</a> for more information.<br>
<br>
Under Windows 95, you can set $VIM in your C:\autoexec.bat file. For<br>
example:<br>
<div class="helpExample"> set VIM=D:\vim</div>
Under Windows NT, you can set environment variables for each user separately<br>
under "Start/Settings/Control Panel->System", or through the properties in the<br>
menu of "My Computer", under the Environment Tab.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
2. Using backslashes <a class="Constant" href="os_dos.html#dos-backslash" name="dos-backslash">dos-backslash</a><br>
<br>
Using backslashes in file names can be a problem. Vi halves the number of<br>
backslashes for some commands. Vim is a bit more tolerant and does not remove<br>
backslashes from a file name, so ":e c:\foo\bar" works as expected. But when<br>
a backslash occurs before a special character (space, comma, backslash, etc.),<br>
Vim removes the backslash. Use slashes to avoid problems: ":e c:/foo/bar"<br>
works fine. Vim replaces the slashes with backslashes internally to avoid<br>
problems with some MS-DOS programs and Win32 programs.<br>
<br>
When you prefer to use forward slashes, set the <a class="Type" href="options.html#'shellslash'">'shellslash'</a> option. Vim will<br>
then replace backslashes with forward slashes when expanding file names. This<br>
is especially useful when using a Unix-like <a class="Type" href="options.html#'shell'">'shell'</a>.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
3. Standard mappings <a class="Constant" href="os_dos.html#dos-standard-mappings" name="dos-standard-mappings">dos-standard-mappings</a><br>
<br>
The mappings for <span class="Special">CTRL-PageUp</span> and <span class="Special">CTRL-PageDown</span> have been removed, they now<br>
jump to the next or previous tab page <a class="Identifier" href="tabpage.html#<C-PageUp>"><C-PageUp></a> <a class="Identifier" href="tabpage.html#<C-PageDown>"><C-PageDown></a><br>
<br>
If you want them to move to the first and last screen line you can use these<br>
mappings:<br>
<br>
<span class="PreProc">key key code Normal/Visual mode Insert mode</span><br>
<span class="Special">CTRL-PageUp</span> <span class="Special"><M-N><M-C-D></span> H <span class="Special"><C-O></span>H<br>
<span class="Special">CTRL-PageDown</span> <span class="Special"><M-N></span>v L$ <span class="Special"><C-O></span>L<span class="Special"><C-O></span>$<br>
<br>
Additionally, these keys are available for copy/cut/paste. In the Win32<br>
and DJGPP versions, they also use the clipboard.<br>
<br>
Shift-Insert paste text (from clipboard) <a class="Constant" href="os_dos.html#<S-Insert>" name="<S-Insert>"><S-Insert></a><br>
<span class="Special">CTRL-Insert</span> copy Visual text (to clipboard) <a class="Constant" href="os_dos.html#<C-Insert>" name="<C-Insert>"><C-Insert></a><br>
<span class="Special">CTRL-Del</span> cut Visual text (to clipboard) <a class="Constant" href="os_dos.html#<C-Del>" name="<C-Del>"><C-Del></a><br>
Shift-Del cut Visual text (to clipboard) <a class="Constant" href="os_dos.html#<S-Del>" name="<S-Del>"><S-Del></a><br>
<span class="Special">CTRL-X</span> cut Visual text (to clipboard)<br>
<br>
These mappings accomplish this (Win32 and DJGPP versions of Vim):<br>
<br>
<span class="PreProc">key key code Normal Visual Insert</span><br>
Shift-Insert <span class="Special"><M-N><M-T></span> "*P "-d"*P <span class="Special"><C-R><C-O></span>*<br>
<span class="Special">CTRL-Insert</span> <span class="Special"><M-N><M-U></span> "*y<br>
Shift-Del <span class="Special"><M-N><M-W></span> "*d<br>
<span class="Special">CTRL-Del</span> <span class="Special"><M-N><M-X></span> "*d<br>
<span class="Special">CTRL-X</span> <span class="Special"><C-X></span> "*d<br>
<br>
Or these mappings (non-Win32 version of Vim):<br>
<br>
<span class="PreProc">key key code Normal Visual Insert</span><br>
Shift-Insert <span class="Special"><M-N><M-T></span> P "-dP <span class="Special"><C-R><C-O></span>"<br>
<span class="Special">CTRL-Insert</span> <span class="Special"><M-N><M-U></span> y<br>
Shift-Del <span class="Special"><M-N><M-W></span> d<br>
<span class="Special">CTRL-Del</span> <span class="Special"><M-N><M-X></span> d<br>
<br>
When the clipboard is supported, the "* register is used.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
4. Screen output and colors <a class="Constant" href="os_dos.html#dos-colors" name="dos-colors">dos-colors</a><br>
<br>
The default output method for the screen is to use bios calls. This works<br>
right away on most systems. You do not need ansi.sys. You can use ":mode" to<br>
set the current screen mode. See <a class="Identifier" href="term.html#:mode">:mode</a>.<br>
<br>
To change the screen colors that Vim uses, you can use the <a class="Identifier" href="syntax.html#:highlight">:highlight</a><br>
command. The Normal highlight group specifies the colors Vim uses for normal<br>
text. For example, to get grey text on a blue background:<br>
<div class="helpExample"> :hi Normal ctermbg=Blue ctermfg=grey</div>
See <a class="Identifier" href="syntax.html#highlight-groups">highlight-groups</a> for other groups that are available.<br>
<br>
A DOS console does not support attributes like bold and underlining. You can<br>
set the color used in five modes with nine terminal options. <span class="Todo">Note</span> that this<br>
is not necessary since you can set the color directly with the ":highlight"<br>
command; these options are for backward compatibility with older Vim versions.<br>
The <a class="Identifier" href="options.html#'highlight'">'highlight'</a> option specifies which of the five modes is used for which<br>
action.<br>
<br>
<div class="helpExample"> :set t_mr=^V^[\|xxm start of invert mode<br>
:set t_md=^V^[\|xxm start of bold mode<br>
:set t_me=^V^[\|xxm back to normal text</div>
<br>
<div class="helpExample"> :set t_so=^V^[\|xxm start of standout mode<br>
:set t_se=^V^[\|xxm back to normal text</div>
<br>
<div class="helpExample"> :set t_us=^V^[\|xxm start of underline mode<br>
:set t_ue=^V^[\|xxm back to normal text</div>
<br>
<div class="helpExample"> :set t_ZH=^V^[\|xxm start of italics mode<br>
:set t_ZR=^V^[\|xxm back to normal text</div>
<br>
^V is <span class="Special">CTRL-V</span><br>
^[ is <span class="Special"><Esc></span><br>
You must replace xx with a decimal code, which is the foreground color number<br>
and background color number added together:<br>
<br>
<span class="PreProc">COLOR FOREGROUND BACKGROUND</span><br>
Black 0 0<br>
DarkBlue 1 16<br>
DarkGreen 2 32<br>
DarkCyan 3 48<br>
DarkRed 4 64<br>
DarkMagenta 5 80<br>
Brown, DarkYellow 6 96<br>
LightGray 7 112<br>
DarkGray 8 128 *<br>
Blue, LightBlue 9 144 *<br>
Green, LightGreen 10 160 *<br>
Cyan, LightCyan 11 176 *<br>
Red, LightRed 12 192 *<br>
Magenta, LightMagenta 13 208 *<br>
Yellow, LightYellow 14 224 *<br>
White 15 240 *<br>
<br>
* Depending on the display mode, the color codes above 128 may not be<br>
available, and code 128 will make the text blink.<br>
<br>
When you use 0, the color is reset to the one used when you started Vim<br>
(usually 7, lightgray on black, but you can override this. If you have<br>
overridden the default colors in a command prompt, you may need to adjust<br>
some of the highlight colors in your vimrc---see below).<br>
This is the default for t_me.<br>
<br>
The defaults for the various highlight modes are:<br>
t_mr 112 reverse mode: Black text (0) on LightGray (112)<br>
t_md 15 bold mode: White text (15) on Black (0)<br>
t_me 0 normal mode (revert to default)<br>
<br>
t_so 31 standout mode: White (15) text on DarkBlue (16)<br>
t_se 0 standout mode end (revert to default)<br>
<br>
t_czh 225 italic mode: DarkBlue text (1) on Yellow (224)<br>
t_czr 0 italic mode end (revert to default)<br>
<br>
t_us 67 underline mode: DarkCyan text (3) on DarkRed (64)<br>
t_ue 0 underline mode end (revert to default)<br>
<br>
These colors were chosen because they also look good when using an inverted<br>
display, but you can change them to your liking.<br>
<br>
Example:<br>
<div class="helpExample"> :set t_mr=^V^[\|97m " start of invert mode: DarkBlue (1) on Brown (96)<br>
:set t_md=^V^[\|67m " start of bold mode: DarkCyan (3) on DarkRed (64)<br>
:set t_me=^V^[\|112m " back to normal mode: Black (0) on LightGray (112)</div>
<br>
<div class="helpExample"> :set t_so=^V^[\|37m " start of standout mode: DarkMagenta (5) on DarkGreen<br>
(32)<br>
:set t_se=^V^[\|112m " back to normal mode: Black (0) on LightGray (112)</div>
<br>
<span class="PreProc">==============================================================================</span><br>
5. File formats <a class="Constant" href="os_dos.html#dos-file-formats" name="dos-file-formats">dos-file-formats</a><br>
<br>
If the <a class="Type" href="options.html#'fileformat'">'fileformat'</a> option is set to "dos" (which is the default), Vim accepts<br>
a single <span class="Special"><NL></span> or a <span class="Special"><CR><NL></span> pair for end-of-line (<span class="Special"><EOL></span>). When writing a<br>
file, Vim uses <span class="Special"><CR><NL></span>. Thus, if you edit a file and write it, Vim replaces<br>
<span class="Special"><NL></span> with <span class="Special"><CR><NL></span>.<br>
<br>
If the <a class="Type" href="options.html#'fileformat'">'fileformat'</a> option is set to "unix", Vim uses a single <span class="Special"><NL></span> for <span class="Special"><EOL></span><br>
and shows <span class="Special"><CR></span> as ^M.<br>
<br>
You can use Vim to replace <span class="Special"><NL></span> with <span class="Special"><CR><NL></span> by reading in any mode and<br>
writing in Dos mode (":se ff=dos").<br>
You can use Vim to replace <span class="Special"><CR><NL></span> with <span class="Special"><NL></span> by reading in Dos mode and<br>
writing in Unix mode (":se ff=unix").<br>
<br>
Vim sets <a class="Type" href="options.html#'fileformat'">'fileformat'</a> automatically when <a class="Type" href="options.html#'fileformats'">'fileformats'</a> is not empty (which is<br>
the default), so you don't really have to worry about what you are doing.<br>
<a class="Identifier" href="options.html#'fileformat'">'fileformat'</a> <a class="Identifier" href="options.html#'fileformats'">'fileformats'</a><br>
<br>
If you want to edit a script file or a binary file, you should set the<br>
<a class="Type" href="options.html#'binary'">'binary'</a> option before loading the file. Script files and binary files may<br>
contain single <span class="Special"><NL></span> characters which Vim would replace with <span class="Special"><CR><NL></span>. You can<br>
set <a class="Type" href="options.html#'binary'">'binary'</a> automatically by starting Vim with the "-b" (binary) option.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
6. :cd command <a class="Constant" href="os_dos.html#dos-:cd" name="dos-:cd">dos-:cd</a><br>
<br>
The ":cd" command recognizes the drive specifier and changes the current<br>
drive. Use ":cd c:" to make drive C the active drive. Use ":cd d:\foo" to go<br>
to the directory "foo" in the root of drive D. Vim also recognizes UNC names<br>
if the system supports them; e.g., ":cd \\server\share\dir". <a class="Identifier" href="editing.html#:cd">:cd</a><br>
<br>
<span class="PreProc">==============================================================================</span><br>
7. Interrupting <a class="Constant" href="os_dos.html#dos-CTRL-Break" name="dos-CTRL-Break">dos-CTRL-Break</a><br>
<br>
Use <span class="Special">CTRL-Break</span> instead of <span class="Special">CTRL-C</span> to interrupt searches. Vim does not detect<br>
the <span class="Special">CTRL-C</span> until it tries to read a key.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
8. Temp files <a class="Constant" href="os_dos.html#dos-temp-files" name="dos-temp-files">dos-temp-files</a><br>
<br>
Only for the 16 bit and 32 bit DOS version:<br>
Vim puts temporary files (for filtering) in the first of these directories<br>
that exists and in which Vim can create a file:<br>
$TMP<br>
$TEMP<br>
C:\TMP<br>
C:\TEMP<br>
current directory<br>
<br>
For the Win32 version (both console and GUI):<br>
Vim uses standard Windows functions to obtain a temporary file name (for<br>
filtering). The first of these directories that exists and in which Vim can<br>
create a file is used:<br>
$TMP<br>
$TEMP<br>
current directory<br>
<br>
<span class="PreProc">==============================================================================</span><br>
9. Shell option default <a class="Constant" href="os_dos.html#dos-shell" name="dos-shell">dos-shell</a><br>
<br>
The default for the <a class="Type" href="options.html#'sh'">'sh'</a> (<a class="Type" href="options.html#'shell'">'shell'</a>) option is "command.com" on Windows 95 and<br>
"cmd.exe" on Windows NT. If SHELL is defined, Vim uses SHELL instead, and if<br>
SHELL is not defined but COMSPEC is, Vim uses COMSPEC. Vim starts external<br>
commands with "<span class="Special"><shell></span> /c <span class="Special"><command_name></span>". Typing <span class="Special">CTRL-Z</span> starts a new command<br>
subshell. Return to Vim with "exit". <a class="Identifier" href="options.html#'shell'">'shell'</a> <a class="Identifier" href="starting.html#CTRL-Z">CTRL-Z</a><br>
<br>
If you are running a third-party shell, you may need to set the<br>
<a class="Identifier" href="options.html#'shellcmdflag'">'shellcmdflag'</a> (<a class="Type" href="options.html#'shcf'">'shcf'</a>) and <a class="Identifier" href="options.html#'shellquote'">'shellquote'</a> (<a class="Type" href="options.html#'shq'">'shq'</a>) or <a class="Identifier" href="options.html#'shellxquote'">'shellxquote'</a><br>
(<a class="Type" href="options.html#'sxq'">'sxq'</a>) options. Unfortunately, this also depends on the version of Vim used.<br>
For example, with the MKS Korn shell or with bash, the values of the options<br>
should be:<br>
<br>
<span class="PreProc">DOS 16 bit DOS 32 bit Win32 </span><br>
<a class="Type" href="options.html#'shellcmdflag'">'shellcmdflag'</a> -c -c -c<br>
<a class="Type" href="options.html#'shellquote'">'shellquote'</a> "<br>
<a class="Type" href="options.html#'shellxquote'">'shellxquote'</a> "<br>
<br>
For Dos 16 bit this starts the shell as:<br>
<span class="Special"><shell></span> -c "command name" >file<br>
For Win32 as:<br>
<span class="Special"><shell></span> -c "command name >file"<br>
For DOS 32 bit, DJGPP does this internally somehow.<br>
<br>
When starting up, Vim checks for the presence of "sh" anywhere in the <a class="Type" href="options.html#'shell'">'shell'</a><br>
option. If it is present, Vim sets the <a class="Type" href="options.html#'shellcmdflag'">'shellcmdflag'</a> and <a class="Type" href="options.html#'shellquote'">'shellquote'</a> or<br>
<a class="Type" href="options.html#'shellxquote'">'shellxquote'</a> options will be set as described above.<br>
<br>
vim:tw=78:ts=8:ft=help:norl:<br>
</div>
</article>
<footer>
<a href="#top">Return to the top</a> - <a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
<span class="CurrentLanguage">English</span>
</span>
<br />
<div style="text-align:right;">
Hosted by <a href="https://github.com/vim-jp/vimdoc-en">vimdoc-en project</a><br />
If you met any problem, please report it to <a href="https://github.com/vim-jp/vimdoc-en/issues">issue</a>.<br />
</div>
</footer>
<!--<script src="js/check-referrer.js" type="text/javascript"></script>-->
</body>
</html>
<!-- vim:set ts=8 sts=2 sw=2 tw=0 et: -->
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。