Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

SearchInFiles, Search in cur. opened Files

Plugins
2005-07-13
2013-04-26
  • MartinKirst
    MartinKirst
    2005-07-13

    Hi there.

    Plugin: SearchInFiles

    I think it would be usefull if I can search/replace in currently opened Files. So i've enhanced this plugin.
    I've made two patches: First one without additional button and second one with an additional button.
    What are the developers thinking?

    MIME-Version: 1.0
    Content-Type: application/octet-stream; name="patches.zip"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment; filename="patches.zip"

    UEsDBBQAAgAIAMKi7TJz1CPg+gIAAFYHAAAiAAAAc2VhcmNoaW5maWxlcy1jdXJvcGVuZWRmaWxl
    cy5wYXRjaJWUYW+iQBCGP+uvmNik1QhbsBWrl8tplV5NWttU631omobCbtk7ZAksVe/X3y6ggK13
    nl9cdmae3XnfAYcSAmoMU2yFtjv2r6iHI1VHZ0g/Le2hYP1ZkvqLhhFXPyZXVVU9iFppaVpb1Vqq
    3gat22sbvfY50jY/aGq6plWbzeZ/nZ5BO6p+BrqAdnotAxmGbnQvLs4lVMSr/T6orXa7rRjQTP47
    0O9XoVKJsEfQePRy/2BemQ/mZGhO4SssV2iCl2On3ijmzMfmj71BczSelYPNPDh8fBDs2dX45i/4
    weXd42xv9Nq8ud8JZl11WmlXnbOsq20ZdihfYD9O627FqsDcBNEgCLDv1IuNKFA7HsZhiH0OI2bf
    W9yt5Q3tqyx2KQgbwJ1IguPErlp+vARcWmGJsQErtWNTLGX2Nv+d4uWHXlIBup1UgG63bOslFWCR
    bM5nL7fm5FEBSPbv/MEri7kC1BG0kvyNA4qvsRfs1EpzDinNJJF67hCk6rnC/yRITRNFdzBFCw65
    0FyouoOQU54Jf7RcBWvuMh9e47dvsGThLytkse/0QOxxFwORL6V4iOhvrCQ7tkel6Y7FLVhSh7tA
    I/AZB5uJm9s89czQ01fR0C+Ulp6a5mACJYmSoVAAv4vnRm/bTWD52EP2JVuNqCSycI2mmM8tL8ZQ
    Z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gkWicZXml2dSZTUekGjB4VQo
    8CtWOf8DUEsBAhQAFAACAAgAwqLtMnPUI+D6AgAAVgcAACIAAAAAAAAAAAAgAAAAAAAAAHNlYXJj
    aGluZmlsZXMtY3Vyb3BlbmVkZmlsZXMucGF0Y2hQSwECFAAUAAIACAC6ou0y4GYz5PcEAAAwDgAA
    LQAAAAAAAAAAACAAAAA6AwAAc2VhcmNoaW5maWxlcy1jdXJvcGVuZWRmaWxlcy13aXRoYnV0dG9u
    LnBhdGNoUEsFBgAAAAACAAIAqwAAAHwIAAAAAA==

     
    • Hello,

      great, but I cannot download your patch.

      The code in SinFiles is a bit messy, because it was
      exended bit by bit without a general concept in the beginning.

      What I could also imagine, using a list box or
      better a treelistcontrol to expand/collapse the files:
      result: (after searching for 'Button')
      a.py
      ->34: w=wx.Button(...
      ->76  r= w=wx.Button(

       
    • MartinKirst
      MartinKirst
      2005-07-14

      If you having trouble while downloading the patch, try the following:
      1. create a new text file with your favorite text editor
      2. copy the big ascii block out of the browser  (start with UEsDB)
      3. Paste all ascii lines in your new text file (incl. last line AAAAAA==)
      4. save this text file
      5. fire up a python shell
      6. type:
      import binascii
      f = open("asciitext.uue") # your downloaded text
      ascii = f.read()
      f.close()
      f = open("patches.zip","wb")
      f.write(binascii.a2b_base64(ascii))
      f.close()
      7. Done. you now have a .ZIP file called patches.

      PS: For applying these patches you will need a 'patch' util,  AFAIK shipped with gcc.

       
    • it works, thanks!

      for the plugin itself:
      Problem is, if some files have the same names, and exist in several directories, also these are found.

       
    • MartinKirst
      MartinKirst
      2005-07-14

      Yes I know this problem.
      But you can select "ask on each replace" ...
      So I don't think, that double file names are a problem.
      Maybe note one or two lines in "help".

      By the way, if you forget to unselect "incl. subdirs" you will also have the problem of multiple file hits ...

      So, is there any chance that this patches will merge into "official SearchInFiles plugin"?

       
    • >By the way, if you forget to unselect "incl. subdirs" you will also have the problem of multiple file hits ...

      Yes, that was it.

      >So, is there any chance that this patches will merge into "official SearchInFiles plugin"?

      Yes, at any rate from my side.
      Dan wrote the SearchInFiles Plugin until 1.0, then I extended it bit by bit.
      I have also made some small changes and bug fixes since 1.3.1.

      I like more the version with the menu rather than this with
      the buttons. the dialog is already a little overloaded.
      What do you think?

       
      • MartinKirst
        MartinKirst
        2005-07-14

        > I like more the version with the menu rather than this with
        > the buttons. the dialog is already a little overloaded.
        > What do you think?

        Yes, a bit overloaded. Thats why I made two patches ;-)

        As you wrote, that the code is a bit messy ...
        Yes I agree.
        I'm writing my diploma thesis at the moment, so my
        spare time is rare counted. But I'm planing to support more patches in the future.

         
    • Hello, I updated SearchInFiles to version 1.3.2.

        - Patch from Master_Jaf, for 1.3.2, 14.07.2005:
          Search in currently open files, thanks
          Added in Edit => Currently open files a hotkey Alt-O for faster access
        - simplified OnDetail
        - fixed: Position problem in Right Down in Listctrl fixed
        - fixed: OnBtn Browse (should now jump by default to the last entered dir in the dirbox)
        - changed and fixed: in quick view details, the Button next/previous occurances
            were not shown accordingly; changed to Disable and Enable Button.
        - Should now show menu identifier (example Search In Files Ctrl-Shift-F)

       
    • I saved both patches.
      Good luck for your diploma thesis.
      If you want to contriute in the future, you are invited of course.
      You could also extend or write a second SearchInFiles
      plugin, if your ideas differs to much from the existing one.

      I made a small change, but don't want to release a new
      version for that.
      typing error for Shortcut: I replaced all Ctrl-O with Alt-O
      shortcut.
      Alt-A is insert current doc directory.
      Also on the end of:
      def OnCurrentOpenFiles(self, event):
      I inserted:        self.panel.chkSubDirectories.SetValue(False)