Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

spacemacs

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.

like image 957
user2331095 Avatar asked Feb 21 '16 02:02

user2331095


People also ask

How to create new file in Emacs?

To create a new file, use Control-X-Control-F, just as if the file already existed. When emacs asks you for the file name, type in the name you want your new file to have, and emacs will create the file, and display an empty buffer for you to type in. Emacs will perform file name completion for you.

How do I open a Spacemacs file?

Since Spacemacs is build upon Emacs, the regular command for find-file works. Pressing C-x C-f (that is, control x control f ) will open the file menu.

How does Spacemacs work?

Spacemacs uses an Emacs package called Projectile to automatically detect when you are working inside of a project, and it allows you to search for files or text within the context of that project. Projectile usually uses source control hooks to determine if you are in a project (e.g., a . git directory).

Is Spacemacs any good?

I used Spacemacs for two weeks at work as my main editor. The Vim layer was great for my normal Vim editing and movement commands, so I was happy with that side of things. The file and project management features are full-featured and fast, I felt comfortable using them almost right away.


1 Answers

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.

like image 183
StreakyCobra Avatar answered Oct 15 '22 11:10

StreakyCobra