Skip to content
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

Find into Folder #6

Closed
anatooly opened this issue Dec 12, 2012 · 12 comments
Closed

Find into Folder #6

anatooly opened this issue Dec 12, 2012 · 12 comments

Comments

@anatooly
Copy link

How find into folder, when I example use bookmark?

Ctrl + Shift + F

Into "Where" write my select path now. For fast navigate and find text into folder, when project very large, that more effective.

@facelessuser
Copy link
Owner

Not sure what you mean. Are you saying you want to populate the find in folder widget with the current folder you are in via Fuzzy File Nav? If so, I could probably look into to that.

@anatooly
Copy link
Author

Sorry for my english)

  1. I have very large project (many files/folders), more 10 000;
  2. I create bookmark for 20 favorite directory;
  3. I need always find some text at my favorite directory in bookmark;
  4. I open bookmark (Ctrl+Shift+O);
  5. Go to may folders;
  6. How I find sometext of this folder?
  7. I can not use Sidebar at left part of Sublime (Find in Folder), because list of directories and files very long;
  8. Very cool if in open bookmark (folders list) I can open "Find in Folder" my select folder now;
  9. If I need use shortcut Ctrl + Shift + F, I not remember correct folder path.

Thanks.

@facelessuser
Copy link
Owner

I think I understand what you are asking for. I will try and add the ability to open "Find in Folder" with the current FuzzyFileNav directory.

@facelessuser
Copy link
Owner

Added shortcut ctrl+f or super+f in OSX to open the Find in Folder with the current Fuzzy File Nav directory. Please let me know if this is what you wanted.

@anatooly
Copy link
Author

Yeah, I now use it and very happy. But:

I think for best usability needed:

  1. If in FuzzyFileNav (Ctrl+O) select currect directory (files only). I see:
    .. (<- select default)
    file1.txt
    file2.txt
    file3.txt

I click Ctrl + F and search at current directory. This cool, and now work.

  1. If in FuzzyFileNav (Ctrl+O) or (Ctrl+Shift+O) select only directory list, not files. I see:

Folder1/ (<- select default)
Folder2/
Folder3/

If I select (Folder2), may be keyboard bottom down, or may be fast search enter key "er2" automatic select Folder 2, but if I use Ctrl+F then for search not use this folder. Use parent directory.

  1. I think may be needed if select folder, then Ctrl+F search at select (in FuzzyFileNav) directory. But not search in ".." folder. If select file than use current directory.

  2. I think this most correct:

  1. If I needed search at folder I select it in FuzzyFileNav and click Ctrl+F;
  2. If I needed search at current folder I select one files of this folder or top folder ".." (exception for folder .. because it always select default);
  3. If I needed search at current file I open it and use standart Sublime Ctrl+F on source file (for this not needed FuzzyFileNav);

Big thanks for you great work and cool Sublime package FuzzyFileNav.

@facelessuser
Copy link
Owner

I am not entirely clear yet on your last descriptions. I will try and read through it a couple of times and post back with what I think you are describing.

It sounds like the new feature is working for you though, but that you have some other suggestions. I am having a difficult time understanding what those suggestions are, so give me some time to try and understand. Any clarification you can give might be helpful as well.

@anatooly
Copy link
Author

May be I think this code:

class FuzzySearchFolderCommand(sublime_plugin.WindowCommand):
    def run(self):
        full_name = path.join(FuzzyFileNavCommand.cwd, FuzzyPanelText.get_content()) # Select path: folder or file
        if os.path.isdir(full_name) == True or full_name != '..': # If directory and not ".." (prev. dir) search at select dir
            self.window.run_command("show_panel", {"panel": "find_in_files", "where": full_name})
        else: # if select file or ".." dir, then search at current dir
            self.window.run_command("show_panel", {"panel": "find_in_files", "where": FuzzyFileNavCommand.cwd})

@facelessuser
Copy link
Owner

Okay, I think I see now. You want to be able to enter a directory name in the FuzzyFileNav Panel and have it use that folder name in the "Find in Files" Panel. I can do that.

@anatooly
Copy link
Author

I experiment with code. And think that I say not possible, because for view elements use:

show_quick_panel(items, on_done, )

it not have event on_change and we not have what element now select in our panel. Only when click for them - on_done event.

@facelessuser
Copy link
Owner

Unless I misunderstand what you want, I should be able to do what you need; I have just had a lot going on right now, so I haven't had a chance.

@facelessuser
Copy link
Owner

Sorry it took so long. This should work now. If you enter a folder name in the quick panel and press the search shortcut, it should use the folder you specified.

@edziba
Copy link

edziba commented Mar 2, 2013

Hi there. I just set my bookmarks like so:
"bookmarks": [
{"name": "My Computer", "path": {"#multiconf#": [{"os:windows": "c:\users\Mehdi\AppData\Roaming"}]}},
{"name": "Root", "path": {"#multiconf#": [{"os:linux": "/"}, {"os:osx": "/"}]}}
]

When I want to contex click to start FuzzyFileNav, I get the error window:
Error tying to parse settings:Unexpected trailing characters in C:\Useres\Mehdi-2\AppData\Roaming\Sublime Text 2\Packages\User\fuzzy_nav.sublime-settings:1:13

What did I do wrong???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants