究竟如何使用 Emacs 创建新目录?我使用什么命令? (如果可以的话请举个例子)
-
创建目录dir/to/create
, type:
M-x make-directory RET dir/to/create RET
-
创建目录dir/parent1/node
and dir/parent2/node
, type:
M-! mkdir -p dir/parent{1,2}/node RET
它假设 Emacs 的劣质 shell 是bash
/zsh
或其他兼容的外壳。
-
or in a Dired
mode
+
它不会创建不存在的父目录。
Example:
C-x d *.py RET ; shows python source files in the CWD in `Dired` mode
+ test RET ; create `test` directory in the CWD
CWD
代表当前工作目录。
-
或者只是使用不存在的父目录创建一个新文件C-x C-f
并输入:
M-x make-directory RET RET
在最新的 Emacs 版本中,Emacs 要求在保存新文件时自动创建父目录。对于旧版本,请参阅如何让 Emacs 在保存文件时创建中间目录? https://stackoverflow.com/q/6830671/4279
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)