Menu

Open Explorer window to current file?

edmicman
2007-11-28
2012-11-13
  • edmicman

    edmicman - 2007-11-28

    Via the Run... (F5) command, is it possible to open an Explorer instance in the current directory that the open file is in?  I can enter "explorer.exe" as the run command, but is there something I can pass to it to open to the current directory that contains the focused open file? 

     
    • Harry

      Harry - 2007-11-28

      explorer "$(CURRENT_DIRECTORY)" ought to do it

      Note to Don: is it really a must to specify a shortcut. The more general problem is: When specifying a shortcut, Notepad++ enforces you to do so. So when you for instance remap a plugin shortcut you cannot unmap it (although its possible to remap it to the same mapping). I'd like to be able to specify a 'blank' shortcut so that either the default gets used or no shortcut is mapped.

       
      • edmicman

        edmicman - 2007-11-28

        Awesome - thank you!!  I ended up going with this:

        explorer /e,"$(CURRENT_DIRECTORY)"

        which opens explorer with the folders view, too.

        Next question....where are these shortcuts stored, or why can't I edit created shortcuts?  I deleted some mistakes via the Shortcut Mapper, but is there not a way to edit existing Run... shortcuts?  Or even a plaintext file?  I didn't see it in the configuration files....

        Thanks again!

         
      • Don HO

        Don HO - 2007-11-28

        > Note to Don: is it really a must to specify a shortcut.

        I don't follow you : what shortcut are you talking about?

        Don

         
        • siqi-du

          siqi-du - 2007-11-29

          en, they means if you store a run command, it will be added to the shortcut mapper;

          But I think it is a little inconvenient that if I made some typing mistakes when storing a command, I have to delete it from the shortcut mapper list and create another. Because of so many shortcuts locating is not very easy in the table.

          Another two sounds like bugs:
          1.If I create different commands with same hotkeys, it is acceptable for notepad++, there is no check.

          2.If I type "ping 192.168.0.1" in Run textbox and run, it works.
          But if I use the $(CURRENT_WORD) as a shutcut command, choose "ping 192.168.0.1" in text then run, it doesn't work. I look into the code , find it exact arguments first and expand the environment variables. so ShellExecute() think "ping 192.168.0.1" is the cmdname. I consider that why not choose the system(). The dialog of run doesn't distinguish cmd and arg, which cause I assume that I can use batch cmd here.

          Thank you very much.
          siqi.du@gmail.com

           
    • Harry

      Harry - 2007-11-28

      You can edit the run commands from the shortcut mapper, there practically on the bottom. To delete rightclick and select delete

       
    • Harry

      Harry - 2007-11-28

      The main menu shortcuts (accelerator key actually). If I were to create a new Run command I must specify a shortcut key, even if I dont want to, the shortcut dialogbox wont allow me to select ok if I select the empty string. Another example is remapping the key for a plugin. I once mapped ESC to close a dialog, but I couldnt unmap it to nothing again, I had to manually remove the entry from the xml file that notepad uses to store the shortcuts.
      If I were to map some combination to some option, but later like to remap that same combination to something else, I cannot remove the first entry and have to change it to some arbitrary combination so both commands wont conflict with each other (might be nice aswell, a warning on a double mapping).

       
MongoDB Logo MongoDB