- Notifications
You must be signed in to change notification settings - Fork 94
Proposed changes to increase file-rename usability and also rename/delete git-tracked files. #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…tory path is selected for the rename
…tracked by git and the user sets his package setting `version_control` to "git" (new setting added)
… to see if git is available
… deletion, including the git rm version
| Glad you enjoy the plugin 😄 Good idea mimicking the behavior of I don't mind adding in the behavior to do some basic VCS management. However, I'll likely put it behind a togglable setting. Since the plugin seems to be pretty wide spread, I don't want to change the end user experience to much. I'm sure you noticed all the settings I added over time to mimic this. Funny enough, I wrote some delete functionality for another user recently. Though they were working through context menus. I'm confused by what you mean by what you mean by pulling in files. Are you just referring to being able to specify arbitrary files, beyond the project? If that's the case, I can do some work to integrate it into the auto complete behavior. I wasn't sure how much file system management people were doing with the plugin, so I've just been adding things as there seems to be a demand for it. Guess it's time to do delete (well you did the work for that). With all that being said, I'll take a look at what you've done. If you find more functionality please create more issues. Of course, pull requests are always welcome. 👍 |
| Hiya Scott, Sorry I wasn't clear about the delete functionality. What I did was tap in to the functionality available from the open view. But I can imagine a use case where you'd want to delete a file without having to open it, so you would open up the file by typing in the path with your path completion in the input window. However, your path completion only does folders, so I would imagine that if you were in delete mode, you'd pull in both folders and files. Having typed that out now, I realize that actually using Sublime's fuzzy logic to open a file would actually be faster, and then after seeing the file content, deleting it with a keyboard shortcut might actually be faster, so I retract that statement. ;-) Regarding using settings to toggle whether to git mv or not, if you look at btsai@817b916, you'll see that actually that's what I first did, but thought that the automatic method would probably be better as it's one less configuration to do, and if you're using git, I couldn't imagine a use case where you'd chose 'mv' over 'git mv'. Anyhow, it's your plugin, and it makes my life easier. I did my first Sublime plugin for Rails and while battling it out with Python, I just gave in and used Python only as a bridge to Rubyland - performance wasn't really an issue. Kudos to all of you who do it all in Python - I don't have to time to learn it. Good work! Cheers, Brian |
| Honestly, I started playing with ST plugins to learn a bit of python. It's kind of grown from there. Actually, the logic to display files is already there. Just hidden behind one of the toggles ( I appreciate the work you put in. What I think I'll end up doing is first merging your stuff into a dev branch, do a bit of clean up (more personal clean up than your stuff), then merge it into master. |
| No worries. I'll keep an eye for your changes. Cheers, Brian |
| I've addressed some of the issues I saw with the git stuff (currently in the dev branch). Though I haven't been able to test it thoroughly, so I won't push it out to master yet. That being said, I am working on a bunch of the clean up (really I'm rebuilding the plugin as the plugin has grown more than I expected). I likely won't push the changes out to master until I wrap that up. Things have been a bit hectic for me lately, but I'll try to get everything pushed out soon. |
| thanks for adding in the stuff i couldn't do, like the windows compatibility. i look forward to your release sometime in the future! |
| Still need to do a bit more testing, but if you would like to checkout what I've done, take a look at the refactor branch. If you do decide to try it, let me know if you run into any issues. I decided to remove the Main menu entries (as well as the default side bar context menu entries). However, I've included information on how to set this up yourself here. |
| no worries about the menus - i added them into my user package. looks like you need to change line 40 of command_base.py from: |
| btw, that's a serious refactor. i think your docs will need to be updated also when you release this branch. looking at your code, i'm guessing that i needed to add the following setting to get git mv to work. after doing this, i confirm that git files are moved with git, non-git files are moved with unix mv. same with delete file. thanks! |
| Thanks for looking it over. Yup, I need to do some documentation updates. Hopefully, aside from removing/adding a few settings, most the functionality itself remained the same. Yup took to long to track down some issues with the initial pull request (mostly because things were more ugly than they currently are). But now it's easier to see how to hook into the input panel stuff (rather than the if...else stuff I was doing before). |
| hi scott, totally different issue/question, quite specific to sublime, but i was wondering if you know how to force reloading of sublime-completions files. right now, you have to quit and then restart sublime in order to see any changes to sublime-completions files reflected in the autocomplete. i posted something on the sublime forum but only 18 views, no replies: cheers, brian |
| sorry, i couldn't figure out how to contact you in any other way. cheers |
| Hey Brian, just thought I'd give you an update. First, I apologize for taking so long. As you saw, a lot of the work was finished a while ago. I'm going to do some testing in ST2, then I'll be ready to push (hopefully this week). Anyways, thanks for your patience and all the work you put in! |
| Hi Scott, No need for apologies ! I'm using a clone from github, but will be happy to try out through the package plugin when it's ready and give it a test. I'm sure the whole community appreciates your efforts. Btw, I was looking for something to allow me to use the keyboard to go to a file location found in the the find-in-files, and bumped into your gist for FindInFilesGoto and tweaked it for my needs. Thanks there too! Thanks again. |
| Hi Brian, I've pushed everything (finally) to the master branch! Thanks for the initial work on everything! |
| looking forward to trying it out!! best, brian |
| scott, merry xmas. i have confirmed that create, move, delete are all working, including files in or out of git. cheers, brian |
| one nice-to-have tweak would be to automatically add on the file's extension to the rename function, if it's not specified, so that: |
| Created #71 if you would like to watch the issue. |
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:
I also updated the status message to reflect this behaviour.
This behaviour has been added, and will run if it finds (a) git is available and (b) the file is tracked by git.
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.
Thanks for a GREAT plugin,
Brian