Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Is it possible to map multiple keys to notepad++ functions?

    General Discussion
    4
    26
    365
    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.
    • Alan Kilborn
      Alan Kilborn @Anthony Blinco last edited by

      @Anthony-Blinco

      Sorry; you’ll have to wait for someone else to reply on NppExec.
      While the contributors to this thread are aware of NppExec, we may not know a lot about it because we’re better at PythonScripting (and thus don’t have much of a need for what NppExec offers).

      1 Reply Last reply Reply Quote 0
      • PeterJones
        PeterJones @Anthony Blinco last edited by

        @Anthony-Blinco said in Is it possible to map multiple keys to notepad++ functions?:

        The problem is It always asks me to cancel the current command before it executes the next one

        That means you’ve left some process open. Without seeing your NppExec script, we cannot tell you why it might still have the process open.

        The compile-and-run FAQ gives some examples of NppExec scripts that compile source code then run the resulting program, but don’t have a problem of leaving a process still running. You might want to compare your scripts to those.

        One trick, which is used in those examples, is to give the executable a new cmd window, instead of having it run directly inside the NppExec console – as called by npp_run cmd.exe /k "$(NAME_PART)", which spawns a new external process (npp_run), starts the command interpreter (cmd.exe) in a way that will leave it open after its argument finished (/k), and runs the compiled program in that new process ($(NAME_PART)) – npp_run is basically the NppExec-equivalent of the cmd.exe START command. (The same could also probably be accomplished in NppExec with cmd /c START "$(NAME_PART)".)

        You can also search the forum for @Michael-Vincent posts that contain “NppExec”, as he is a power-user of NppExec (or wait for him to show up, as he might have more advice than I have). And @Vitaliy-Dovgan, the author of NppExec, does come here on occasion

        1 Reply Last reply Reply Quote 3
        • Anthony Blinco
          Anthony Blinco last edited by

          Perfect! Problem solved. Great advice once again.
          Thank you all so much. You guys really know your stuff!

          1 Reply Last reply Reply Quote 2
          • Anthony Blinco
            Anthony Blinco last edited by Anthony Blinco

            Sorry for asking all the stupid questions.
            I tried the block comment/uncomment but it doesn’t work with my particular compiler.

            Can i change the comment/uncomment logic for my language (COBOL)?

            or

            It is a litle nuanced

            1. I need to save the character at column 7 (which is where the comment indicator is *). because it could be one of a couple of values and i would need to restore it when they uncomment
            2. I’m thinking i’m going to have to implement it in python. In which case i need to know how i can replace a line in the editing window

            Thanks again for all your awesome advice

            Also, i couldn’t find the editor.search() function in the python documentation. Am i looking at the right one
            http://npppythonscript.sourceforge.net/docs/latest/scintilla.html#helper-methods

            Alan Kilborn 1 Reply Last reply Reply Quote 0
            • Alan Kilborn
              Alan Kilborn @Anthony Blinco last edited by

              @Anthony-Blinco

              Regarding: “comment…COBOL”: It’s probably best to start a new thread when you want to ask a totally unrelated question to what has come before in the current thread.

              Regarding editor.search() – which is proper for this thread since we’ve been discussing PythonScript – why not just move your caret to an instance of that in your text and invoke Context-Help from the PythonScript menu, right in Notepad++ ?

              Am i looking at the right one

              http://npppythonscript.sourceforge.net/docs/latest/scintilla.html#helper-methods

              I’d give that a “no”.

              PeterJones 1 Reply Last reply Reply Quote 2
              • PeterJones
                PeterJones @Alan Kilborn last edited by

                @Anthony-Blinco,

                @Alan-Kilborn said in Is it possible to map multiple keys to notepad++ functions?:

                Regarding editor.search() – which is proper for this thread since we’ve been discussing PythonScript – why not just move your caret to an instance of that in your text and invoke Context-Help from the PythonScript menu, right in Notepad++ ?

                Am i looking at the right one

                http://npppythonscript.sourceforge.net/docs/latest/scintilla.html#helper-methods

                I’d give that a “no”.

                Specifically, the old sourceforge copy of the documentation is severely out of date.

                When you install PythonScript, it also installs a local up to date version of the PythonScript documentation, which can be accessed through Notepad++ menu Plugins > PythonScript > Context-Help (and, as @Alan-Kilborn mentioned, if your caret is on the editor.search() command, it should open the help to the right place). Use that for all documentation needs on PythonScript. But yes, it is in the helper-methods section of the editor object documentation.

                1 Reply Last reply Reply Quote 3
                • First post
                  Last post
                Copyright © 2014 NodeBB Forums | Contributors