• Login
Community
  • Login

Suggestion about Right Click Context Menu

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
3 Posts 2 Posters 253 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    Maciej Zet
    last edited by Maciej Zet Jun 16, 2025, 8:35 PM Jun 16, 2025, 8:25 PM

    Hello,
    few days ago I asked another community question about context menu when open specify file - my goal was start editing every file ps1 from line 450, and today I get to the point where I know for sure its can be done with registry by simply add in there something like this:
    [HKEY_CLASSES_ROOT\SystemFileAssociations.ps1\Shell\Edit with Notepad++ from line 450\Command]
    @=““C:\Program Files\Notepad++\notepad++.exe” “%1” -n450 %*”

    alt text

    There is only one thing missing - icon on the left side, but of course command is working fine - after click on in every selected file is started from this line.

    So my suggestion for future development of this great tool can be add (somewhere in NP++ options) possibility to activate this for every file or provided extension, where user for example can decide from what line like to starts from, and also this could be for more that one line to choose like:
    more.jpg

    I think this can be helpful to users who works on some templates where pattern is always editing files from the same starting position.

    P 1 Reply Last reply Jun 17, 2025, 3:43 PM Reply Quote 0
    • P
      pbarney @Maciej Zet
      last edited by pbarney Jun 17, 2025, 4:38 PM Jun 17, 2025, 3:43 PM

      @Maciej-Zet, you can add the icon yourself! I believe this is all you need to add:

      [HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\Edit with Notepad++ from line 450]
      "Icon"="C:\\Program Files\\Notepad++\\notepad++.exe"
      

      For others who want to make a similar change, here’s everything, including one line that wasn’t provided:

      [HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\Edit with Notepad++ from line 450]
      @="Edit with Notepad++ from line 450"
      
      [HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\Edit with Notepad++ from line 450\Command]
      @="\"C:\\Program Files\\Notepad++\\notepad++.exe\" \"%1\" -n450 %*"
      
      [HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\Edit with Notepad++ from line 450]
      "Icon"="C:\\Program Files\\Notepad++\\notepad++.exe"
      

      NOTE: If you’re using the 32-bit version of Notepad++, change the folder from C:\\Program Files\\Notepad++\\ to C:\\Program Files (x86)\\Notepad++\\ (or wherever you installed Notepad++).

      M 1 Reply Last reply Jun 18, 2025, 6:35 AM Reply Quote 3
      • M
        Maciej Zet @pbarney
        last edited by Maciej Zet Jun 18, 2025, 6:36 AM Jun 18, 2025, 6:35 AM

        @pbarney BIG thanks as this is was I looking for.
        Just for the record - just checked and 2 entries is also fine:

        Windows Registry Editor Version 5.00
        
        [HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\Edit with Notepad++ from line 450\Command]
        @="\"C:\\Program Files\\Notepad++\\notepad++.exe\" \"%1\" -n450 %*"
        
        [HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\Edit with Notepad++ from line 450]
        "Icon"="C:\\Program Files\\Notepad++\\notepad++.exe"
        
        

        and perfect icon appear :)

        1 Reply Last reply Reply Quote 2
        1 out of 3
        • First post
          1/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors