skuroda/Sublime-AdvancedNewFile — pull request #63 by btsai (2013-11-15 03:41:08+00:00)
Title: Proposed changes to increase file-rename usability and also rename/delete git-tracked files.

Hi,

I love your plugin! There were a few things that I needed to help make it easier for me to use, so I forked and added them, and I've pushed this out as a pull request to you in case you're interested.

I'm a Rails guy, and I just switched to Sublime a few days ago and have been madly trying to get my head around Python, so please excuse any bad code.

Here's what I have added:

1. When you rename a file, as you use the autocomplete (love that!!!), if you hit enter without typing the file name, nothing happens. However, in the terminal, if you use 'mv', if you specify a directory as the target, it will move the file to the new directory while keeping the same name, so I replicated that behaviour.

I also updated the status message to reflect this behaviour.

2. I use git (I assume you do too), and so I found that it would be a heck of a lot easier if your plugin could do the git mv command, if the file was tracked by git.

This behaviour has been added, and will run if it finds (a) git is available and (b) the file is tracked by git.

3. Since your plugin was turning into my main file manager (all from Sublime), I added the last function I needed - deleting the current file.

I didn't have the time to hook it up to your nice autocomplete functionality, but I would imagine a logical UX would be to open your autocomplete but allow files to be pulled in.

4. Lastly, I thought it would help if I could see the keys I mapped to your functions either in the Command browser or the main menu, so I added your functions to those.

Thanks for a GREAT plugin,

Brian