Menu

Open include files when clickin on it

TyllLeyden
2009-07-23
2012-11-14
  • TyllLeyden

    TyllLeyden - 2009-07-23

    Is there any plugin or short-cut to open highlighted text as file.

    e.g. include (config.php);

    now I like to open the config.php .. maybe by mark it and klick ctrl+o or something .. with the same directory like the current file .. so also "include (lib/db.php)" should work.

    Thx for your hints

    Tyll

     
    • Michel Merlin

      Michel Merlin - 2009-07-23

      I warmly support TyllLeyden's suggestion, with a (small) precision: "to open highlighted text as file" should open the very file stated by the highlighted text, including translating the "/" (root) or ".." (parent) or other indication in the file addresses relative to the calling file. If writing this takes time, then DO NOT implement it partially meantime: this would be useless and misleading.

      Versailles, Thu 23 Jul 2009 14:35:20 +0200

       
    • cchris

      cchris - 2009-07-23

      Run -> open file  Alt+F5 Make sure the name of the file to open is selected prior.

      CChris

       
    • Joerg Riedel

      Joerg Riedel - 2009-07-28

      "Alt+F5" or Menu Run->"Open File" at results in a dialog box saying
        "C:\Programme\Notepad++\config.php doesn't exist. Create it?"
      although the file config.php lies byside the current active file.

      Any suggestion to open the file relative to the active one?
      Thanks Jörg

       
    • cchris

      cchris - 2009-07-28

      Run -> Open conaining folder , and then select the file to open.

      Or call shortcuts.xml to the rescue. You can see that Open file is defined as

      $(NPP_DIRECTORY)\notepad++.exe $(CURRENT_WORD)

      Edit the command to read as

      $(NPP_DIRECTORY)\notepad++.exe $(CURRENT_DIRECTORY)\$(CURRENT_WORD)

      You may need double quotes here and there.

      How about changing the stock Open file, or adding a new Open file in containing folder ?

      CChris

       
      • Joerg Riedel

        Joerg Riedel - 2009-07-28

        Modifying shortcuts.xml worked for me.
        Shouldn't $(CURRENT_DIRECTORY)\$(CURRENT_WORD) be default at this place? I think it makes more sense.
        Thanks Jörg

         
    • Stych

      Stych - 2009-08-22

      There'a a direct solution (at least in v5.4.5). Just check the option "Follow $(CURRENT_DIRECTORY)" under the menu "Plugins->NppExec"

       
MongoDB Logo MongoDB