How to create new file from dired mode?

Kei Minagawa picture Kei Minagawa · Nov 30, 2013 · Viewed 29.3k times · Source

I want to create a new file in dired mode. Is there "create new file" command in dired mode ? For example, When I type "c" in dired mode, it creates "untitled.txt". It's very simple , but I can't find it.

Answer

Robin Green picture Robin Green · Nov 30, 2013

Just press C-x C-f. This will prompt for a filename, using the current directory of the current buffer as the directory to put it in. For a dired buffer, its current directory is simply the directory you are looking at.