csch0 / SublimeText-File-Navigator

File Navigator plugin for Sublime Text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A question about improving

titoBouzout opened this issue · comments

commented

Hello!

I like this package. I want to know if you are willing to accept a patch that will use ( in case of installed ) an API of the "SidebarEnhancements" package to do some of the task you are doing.

This will be great for users because many of the problems you have with this package has been solved already there.

The idea is to use the API of SidebarEnhancements for when the user needs deleting, renaming or moving a file.

For example SidebarEnhancements has the following improvements:

-- Removing --

  • has a preference which allow the user to control if all the affected views should be closed when deleting a file or folder.
  • has a preference which control if the user wants a confirmation before deleting a file.
  • sends the file to the trash

-- Renaming and Moving --

  • when the user renames or move a file or folder, all the affected views will reload in sublime, keeping cursor, scroll, bookmarks, folding, marks and syntax.
  • I introduced the possibility to merge when you are renaming or moving to a location that already exists. This is currently only implemented on the function cut/copy or paste. But I hope to enable this soon when renaming/moving.

The syntax of the patch will be something like this:

 def delete_file(self, file_path):
        try:
            import SideBarItem
            SideBarItem.remove(file_path)
        except:
            os.remove(file_path)
    sublime.status_message("File deleted")
commented

Buah, almost the same code as https://github.com/noklesta/SublimeQuickFileCreator

Have you tried to work with this author?
Makes no sense to have 2 packages with almost duplicated code and two preferences files setting the same things.

Sure, I'll be glad to accept any improvements.

As for the Sublime Quick File Creator, it's a different concept a bit. This plugin is just for creating new files/directories. My concept is to allow to do all file navigation and creation through the quick panel, without the need to use the mouse. So if I want to rename certain file, I can do it quickly without touching the mouse, if I want to create new one, copy it, delete etc. I can quickly do it.