A shortcut to Quickly Creating New File


#1

What I miss is the feature to use a shortcut Option + Cmd + N to create new file quickly in Sublime. Maybe we should have it as default with Atom?


#2

There seems to be decent functionality for it, it just needs to be triggered.

require('tree-view/lib/tree').treeView.add()

works, but isn’t the whole story to have it bound to a keycommand.

'cmd-alt-o': 'tree-view:add'

Looks like it might work, but doesn’t. Probably something I’m missing.

Not as fast, but you can press ctrl-0 to switch between editor and tree, and in the tree you can press a to add a folder/file.


#3

cmd + n creates new file in both atom and sublime. or am I missing something?


#4

Yes. It’s the saving that’s the problem. Bring up the console and run

require('tree-view/lib/tree').treeView.add()

That saves the file for you. While not as awesome as https://github.com/noklesta/SublimeQuickFileCreator in Sublime, it’s something at least.

I prefer not using the mouse just to create a file, and the OS X save file window is just horrible.


#5

I would love to see the default OS X be gone, and only get the “save option” that

require('tree-view/lib/tree').treeView.add()

gives me.


#6

Perhaps a little late, but you can get this functionality by typing Ctrl+0 to get to the treeview, and then typing ‘a’ to add a file. It’s two keystrokes, but better than using the mouse.

Also, by using Cmd+Shift+\ you can focus on the current file in the treeview and then use Delete or ‘m’ to delete or move the file.

(I don’t know what the keybindings are exactly in non-Mac systems)


#7

Actually, there’s a fancy-new-file package package that works very much like similar add-ons for Sublime Text.


#8

Just what I was looking for, thanks.


#9

Found a relatively easy way to do this by using the Command Palette:

  • CTRL+SHIFT+P
  • Start typing: ad… and “Tree View: Add file” shows up as the first suggestion

#10

I have tree-view package installed and cmd-alt-O works exactly as expected. Brings up path window with project root and a fuzzy style search delimiter.


#11

the only packages you need is advanced new file.


#12

Here’s how you can do it with creating your own keymap.

Open your keymap.cson file Atom -> Keymap

Now add the following:

'atom-text-editor':
  'cmd-shift-n': 'tree-view:add-file'

Save that file - and now BOOM you’ve got the ability to add a new file in the current tree directory! (I picked cmd-shift-n cause it works for me, but feel free to use a different keystroke).

This works beautifully in conjunction


#13

it seems we can also click near a tab, on the free space 2018-04-09_20-11-02 (if there is space for the next tab)