AdvancedNewFile icon indicating copy to clipboard operation
AdvancedNewFile copied to clipboard

This is better, but not exactly what I was looking for...

Open kennonb opened this issue 12 years ago • 14 comments

I wanted to say that this does ease some of the pain of creating new folders/files in Sublime Text 2. However, this doesn't do exactly what I was hoping for. What I'm looking for may have to be implemented by Jon himself. Not sure.

Reason why I'm posting this is just so it's out there somewhere, and this seems like a good enough place to put it.

My ideal workflow:

  • CTRL+0 -> Go into the sidebar.
  • Use keyboard nav to jump in and out of folders.
  • Use keyboard shortcuts to create files/folders based upon the selected folder level in the sidebar.

Some other advancements:

  • Auto "touch" files as they are created, so I don't have to manually save.
  • Don't create non-extension files for empty folders that are created.
  • Be able to create new folders/files when no files are open in the view.

I might think of more things, but these additions would make it a world better for me. I might take a stab at it myself, if I can get the time.

kennonb avatar May 11 '12 20:05 kennonb

yeah, i'm definitely in for this.

megalithic avatar Sep 01 '12 00:09 megalithic

I know you created this issue a while ago, but I've implemented 2/3 "advancements." I'm not quite sure what you mean by "Don't create non-extension files for empty folders that are created."

So, if you happen to see this, mind giving me an example?

skuroda avatar Oct 31 '12 06:10 skuroda

Also may be a make in current/parent directory kinda functionality... For example if I were to hit Super + Alt + N from a file and then type ./file.ext it would make the file in the same directory as the file which it was opened from and not on the root folder of the project, and if it was ../file.ext it would be in the parent directory. Possible?

shyamsalimkumar avatar Aug 22 '13 17:08 shyamsalimkumar

You can enter a : at the beginning of the input field and it will begin at the current folder. Additionally, if you find yourself wanting the current folder more often than not, you can set the default_root setting to current. If instead you would rather . and .. act special when specifying a path, please open a new issue.

skuroda avatar Aug 22 '13 20:08 skuroda

Not sure why I stopped getting notifications about this. I just happened to come back here, and I have to say that you did a fabulous job. Thanks for implementing those changes.

As for "Don't create non-extension files for empty folders that are created." Basically, I wanted to be able to create New Folders with this plugin as well. Best example I can give:

  • Hit CMD+OPT+N to bring up new file creation input.
  • Type in "test" without an extension.
  • Instead of creating an empty directory, it creates a blank file with no extension.

Now that I'm thinking about it, I don't know why I'd need to create a blank directory without also specifying a file to go in it. But that's what I was trying to allude to in the initial post.

Again, thanks for working on all this. It's a wonderful plugin! :)

kennonb avatar Aug 26 '13 19:08 kennonb

Not that you will ever need to create an empty directory, but if you want to, you can. You will need to add a trailing slash though.

skuroda avatar Aug 26 '13 21:08 skuroda

:+1: Thanks. It throws an error, but does create the empty folder.

kennonb avatar Aug 26 '13 21:08 kennonb

What's the error?

skuroda avatar Aug 26 '13 21:08 skuroda

"Unable to create file: ... [directory path]"

https://www.dropbox.com/s/g2gbw8l1t9qhntw/Screenshot%202013-08-26%2017.34.37.png

The syntax I used: "images/"

https://www.dropbox.com/s/nnluu7vq7uplnqo/Screenshot%202013-08-26%2017.36.34.png

kennonb avatar Aug 26 '13 21:08 kennonb

Hmm, okay I'll try to look into that. I don't see the error. I can't recall if that's something that I addressed previously though. Can you make sure you are on the latest version. If you are cloning, the master branch is compatible with both ST2 and ST3.

skuroda avatar Aug 26 '13 22:08 skuroda

Thanks, no problem. I'm on ST3 and I have the plugin installed using Package Control 2.0.

kennonb avatar Aug 27 '13 01:08 kennonb

Can you go to Package Control: List Packages and tell me what version number comes up (it'll just be a datetime). It's odd to me that you are getting that error. I'm having trouble reproducing it.

skuroda avatar Sep 01 '13 04:09 skuroda

Sure. It's showing v2013.08.14.

http://d.pr/i/zjpV

kennonb avatar Sep 01 '13 20:09 kennonb

Is there any additional information in the ST console when this happens? Thanks for all the help trying to track this down.

skuroda avatar Sep 03 '13 20:09 skuroda