How do I create an empty file in emacs?

前端 未结 15 660
轻奢々
轻奢々 2020-12-13 03:20

How can I create an empty file from emacs, ideally from within a dired buffer?

For example, I\'ve just opened a Python module in dired mode, created a new directory,

15条回答
  •  温柔的废话
    2020-12-13 04:09

    The following works:

    C-x b __init__.py RET C-x C-w RET

    If you're in a dired buffer the file will be saved in the directory show here.

    The trick is to first create an empty buffer by switching to a name that doesn't exist. Then write out the file.

提交回复
热议问题