How do I create an empty file in emacs?

前端 未结 15 652
轻奢々
轻奢々 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 shortest way

    Creates an empty file via a shell operation (but does not open it):

    M-! > __init__.py RET

    Open the new file:

    C-x C-f RET

    (Note: we don't have to type in the name again, because the new file is automatically the first choice)

提交回复
热议问题