Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All categories
    • submitificS

      HOW Do You Add Keyboard Shortcuts

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      11
      0 Votes
      11 Posts
      3k Views
      CoisesC

      @PeterJones said in HOW Do You Add Keyboard Shortcuts:

      Actually, anything in the Scintilla Commands tab of the Shortcut Mapper can have 0 or more shortcuts assigned. It’s not limited to only 2. And it’s not limited to only Copy/Cut/Paste. This is described in the user manual’s Preferences > Shorcut Mapper, specifically in the paragraph that starts with “In the Scintilla commands tab, you can actually assign more than one shortcut to a given Scintilla command”

      This might be confusing to @Michael-Neumann, because Cut, Copy and Paste are no longer Scintilla shortcuts; they moved to the Main menu tab, Edit category, as part of the changes that enhanced multiple selections and implemented VS Code-style line cut/copy/paste.

      Since the two sets of shortcuts, with X/C/V and with Insert/Delete, are so familiar and either would have been missed, special allowance was made to let those menu items have two distinct shortcuts. No other commands work that way.

    • Thorsten HeuerT

      Feature Request / Question: Soft Wrap at Vertical Edge (Column 80) regardless of window size

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      3
      0 Votes
      3 Posts
      92 Views
      fml2F

      @h-jangra said in Feature Request / Question: Soft Wrap at Vertical Edge (Column 80) regardless of window size:

      I have added this in NppVim plugin [. . .]I am not sure how to set text width in notepad++

      That’s interesting! I’d think that a NP++ plugin can only do things that are also possible in NP++ itself since the underlying engine is the same.

    • W

      The problem with notepad.runMenuCommand

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      4
      1 Votes
      4 Posts
      106 Views
      PeterJonesP

      @westyles said in The problem with notepad.runMenuCommand:

      @PeterJones said in The problem with notepad.runMenuCommand:

      And this is not a bug

      Thank you for the clarification
      I replied to you here

      Since it is not a Notepad++ application issue, but your usage of a plugin, with you thinking that the plugin needs a new feature, continuing the conversation in the official application Issues is the wrong place, as I tried to make clear. So I will quote your message from there, and reply here, where it belongs.

      When I figured it out for myself, I realized that in my case, neither of the two commands you mentioned would work. There are no suitable commands.

      I disagree.

      Because I need to call up the menu items created with user userDefineLangs (from files in the userDefineLangs folder), they are created each time npp is started.

      Yep. But they still have command-ID values – you just have to figure out what they are. And once you do, notepad.menuCommand will work for you, because as I quoted before, it is documented to work either with the plugin’s ENUM values for builtin, or using the raw command-ID integer.

      There are no permanent built-in commands for this;

      I disagree.

      only notepad.runMenuCommand is suitable, and it depends on the npp language.

      It’s not the only suitable choice.

      As you wrote, in this case, another command is needed that will call menuId or ID

      That’s exactly what notepad.menuCommand does.

      So, in my current Notepad++ instance, the Language > Markdown (preinstalled) is getting the dynamic commandID=46181. I can determine this easily using the UI Spy plugin:
      fe024044-c9ca-4324-b264-986832378db5-image.png

      So then I call up the PythonScript console, and send the command notepad.menuCommand(46181), and it changes my language from Normal text file (Language > None (Normal Text)) to the UDL Markdown (preinstalled), thus showing that, indeed, you can use already-existing notepad.menuCommand() using an integer command ID to call a UDL’s command ID (or anything else by commandID).

      So if you know the commandID, whether it’s a built-in command or a dynamic command (like a UDL or macro), you can use notepad.menuCommand(). If you don’t already know the commandID, then you cannot use it (but then again, you couldn’t use this “new” function that you claim you want, because this new requested function would also require that you already know the commandID, based on the feature you described).

      So I don’t see why you think it won’t work for you. Because I can use it to call any of the UDL or Macros that I want to call.