Mercurial > vim
comparison runtime/doc/editing.txt @ 167:c93c9cad9618
updated for version 7.0051
author | vimboss |
---|---|
date | Tue, 22 Feb 2005 08:39:57 +0000 |
parents | 6df0106fc595 |
children | 4707450c2b33 |
comparison
equal
deleted
inserted
replaced
166:3a28ed993bbe | 167:c93c9cad9618 |
---|---|
1 *editing.txt* For Vim version 7.0aa. Last change: 2005 Feb 07 | 1 *editing.txt* For Vim version 7.0aa. Last change: 2005 Feb 14 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
1141 | 1141 |
1142 You may use the |:cd| and |:lcd| commands to change to another directory, so | 1142 You may use the |:cd| and |:lcd| commands to change to another directory, so |
1143 you will not have to type that directory name in front of the file names. It | 1143 you will not have to type that directory name in front of the file names. It |
1144 also makes a difference for executing external commands, e.g. ":!ls". | 1144 also makes a difference for executing external commands, e.g. ":!ls". |
1145 | 1145 |
1146 Changing directory fails when the current buffer is modified, the '.' flag is | |
1147 present in 'cpoptions' and "!" is not used in the command. | |
1148 | |
1146 *:cd* *E472* | 1149 *:cd* *E472* |
1147 :cd On non-Unix systems: Print the current directory | 1150 :cd[!] On non-Unix systems: Print the current directory |
1148 name. On Unix systems: Change the current directory | 1151 name. On Unix systems: Change the current directory |
1149 to the home directory. Use |:pwd| to print the | 1152 to the home directory. Use |:pwd| to print the |
1150 current directory on all systems. | 1153 current directory on all systems. |
1151 | 1154 |
1152 :cd {path} Change the current directory to {path}. | 1155 :cd[!] {path} Change the current directory to {path}. |
1153 If {path} is relative, it is searched for in the | 1156 If {path} is relative, it is searched for in the |
1154 directories listed in |'cdpath'|. | 1157 directories listed in |'cdpath'|. |
1155 Does not change the meaning of an already opened file, | 1158 Does not change the meaning of an already opened file, |
1156 because its full path name is remembered. Files from | 1159 because its full path name is remembered. Files from |
1157 the |arglist| may change though! | 1160 the |arglist| may change though! |
1158 On MS-DOS this also changes the active drive. | 1161 On MS-DOS this also changes the active drive. |
1159 To change to the directory of the current file: > | 1162 To change to the directory of the current file: > |
1160 :cd %:h | 1163 :cd %:h |
1161 < | 1164 < |
1162 *:cd-* *E186* | 1165 *:cd-* *E186* |
1163 :cd - Change to the previous current directory (before the | 1166 :cd[!] - Change to the previous current directory (before the |
1164 previous ":cd {path}" command). {not in Vi} | 1167 previous ":cd {path}" command). {not in Vi} |
1165 | 1168 |
1166 *:chd* *:chdir* | 1169 *:chd* *:chdir* |
1167 :chd[ir] [path] Same as |:cd|. | 1170 :chd[ir][!] [path] Same as |:cd|. |
1168 | 1171 |
1169 *:lc* *:lcd* | 1172 *:lc* *:lcd* |
1170 :lc[d] {path} Like |:cd|, but only set the current directory for the | 1173 :lc[d][!] {path} Like |:cd|, but only set the current directory for the |
1171 current window. The current directory for other | 1174 current window. The current directory for other |
1172 windows is not changed. {not in Vi} | 1175 windows is not changed. {not in Vi} |
1173 | 1176 |
1174 *:lch* *:lchdir* | 1177 *:lch* *:lchdir* |
1175 :lch[dir] Same as |:lcd|. {not in Vi} | 1178 :lch[dir][!] Same as |:lcd|. {not in Vi} |
1176 | 1179 |
1177 *:pw* *:pwd* *E187* | 1180 *:pw* *:pwd* *E187* |
1178 :pw[d] Print the current directory name. {Vi: no pwd} | 1181 :pw[d] Print the current directory name. {Vi: no pwd} |
1179 Also see |getcwd()|. | 1182 Also see |getcwd()|. |
1180 | 1183 |