edited shorcuts.xml does not affect npp



  • Hi
    Modified the line for IE explorer to: <Command name=“Launch in IPython” Ctrl=“yes” Alt=“yes” Shift=“yes” Key=“73”>ipython “$(FULL_CURRENT_PATH)”</Command>

    But the changes in xml does not give any changes in the run-command menu.

    What have I done wrong?

    Kind regards nhb



  • Hi
    manual modification of shorcuts.xml is tricky because the file is loaded at Npp startup, and is NOT reload during Npp runtime.
    You should try to edit shorcuts.xml with another editor than Npp, and edit it while Npp is not running.



  • @cmeriaux said in edited shorcuts.xml does not affect npp:

    manual modification of shorcuts.xml is tricky because the file is loaded at Npp startup, and is NOT reload during Npp runtime.
    You should try to edit shorcuts.xml with another editor than Npp

    While I agree that you have to follow a specific order, it is quite possible to edit shortcuts.xml, or the other Notepad++ config files, from inside Notepad++. I do it all the time. The sequence described in the online user manual works for me, as long as you do not make any Notepad++ settings changes in the GUI from steps 2 thru 5.

    1. Close all active instances of Notepad++
    2. Open one instance of Notepad++
    3. Edit the configuration file
    4. Save
    5. Exit Notepad++
    6. Reload Notepad++
    7. The changes will now be in effect.

    The other issue that @Niels-Henrik-Bruun might be dealing with: before v7.6.3, there was an active Launch in IE entry in the “User Defined Commands” (Run-menu) section of shortcuts.xml. In v7.6.3, those lines were put in XML comments, so that they weren’t actively in the menu. (In v7.9.3, the commented-out lines were completely removed from the default shortcuts.xml that ships with Notepad++.) So, if the version that @Niels-Henrik-Bruun started with was v7.6.3 to v7.9.2 (that is, nearly any version in the last two years), the Launch in IE <command ...> tag was inside the <!-- ... --> XML comment, and would not affect Notepad++ whether edited in an external editor, edited in Notepad++, or not edited at all.

    Another issue might be if the c:\program files\notepad++\shortcuts.xml is being edited, but the normal installation is used so that %AppData%\Notepad++\shortcuts.xml is the version being read 🛈, it will also have no effect. Which is the correct shortcuts.xml can be determined by your settings: if the ?-menu’s Debug Info shows Local Conf mode : ON, then you edit the shortcuts.xml in the same folder as notepad++.exe; if you have cloud settings (Settings > Preferences > Cloud & Link has the cloud location path set), then your shortcuts.xml should be edited in that location; otherwise, %AppData%\Notepad++\shortcuts.xml is the right file to edit.

    So, @Niels-Henrik-Bruun, to sum up:

    1. Make sure you are editing the right shortcuts.xml – the cloud folder file, the file in the notepad++ executable’s folder, or the file in the %AppData%\Notepad++ folder
    2. Make sure you are properly editing the file: either close all Notepad++ instances, and edit the file with some other editor; or follow the sequence that I included above and is in the online manual
    3. Make sure that the <command...>...</command> tag is not inside of the <!-- ... --> XML comment
    4. Changes won’t take effect until Notepad++ has been re-started after the edits (step 6-7, above)

Log in to reply