How can I create a new file with a simple way in spacemacs?

user2331095 picture user2331095 · Feb 21, 2016 · Viewed 16.4k times · Source

Currently, I know that I can create a new file with the following ways:

  • c key in Neotree
  • SPC ' in shell layer, and use the touch xxx command

I am wondering whether there is a simple way (something like SPC f xxx) or not.

Thanks.

Answer

StreakyCobra picture StreakyCobra · Feb 21, 2016

Yes, you can use SPC f f, enter the name of the new file and then select the line starting with [?] (which is the default if no other file matches).

Note you can also use this to create files in non-existing subfolders, like SPC f f my/sub/folder/file.txt RET.