Community
    • 登入

    [New Plugin] LuaScript

    已排程 已置頂 已鎖定 已移動 Notepad++ & Plugin Development
    29 貼文 9 Posters 71.5k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • dailD
      dail
      最後由 dail 編輯

      With the two shortcuts I’ve posted they work to enhance the normal copy and cut functionality. If there is a selection they both work as normal copy/cut. If there is no selection then they behave by copying or cutting the line. However, SCI_LINECUT and SCI_LINECOPY doesn’t pay any attention the the selection.

      Secondly, to quote the documentation about SCI_COPYALLOWLINE

      On Windows, an extra “MSDEVLineSelect” marker is added to the clipboard which is then used in SCI_PASTE to paste the whole line before the current line.

      So the difference is when it is pasted it replaces the entire line instead of pasting the line directly at the cursor’s position.

      Similar effects can be achieved both ways but users that are use to Visual Studios will definitely notice a difference.

      1 條回覆 最後回覆 回覆 引用 0
      • YaronY
        Yaron
        最後由 編輯

        Hello all,

        @Claudia-Frank,
        Thank you for your contribution (and generosity…).

        @guy038,
        Thank you for your contribution. Nice to see an old friend. :)

        @dail,
        Thank you for further developing and improving this important plugin. Great work.

        And thanks also for referring to my Copy Line request. Really nice.

        It would be nice to have a function coping the current line regardless of any selection (like editor.lineCopy() in PythonScript).

        I actually meant an option to copy the entire line even if part of it is selected.
        In a future version. :)

        And, with your permission, two more requests:

        1. A context-menu in the Console Output field.
        2. An option to change text direction (LTR/RTL) in the Console Input field.
          (PythonScript uses the System Edit-Context-Menu which includes this functionality).

        Best regards.

        1 條回覆 最後回覆 回覆 引用 0
        • dailD
          dail
          最後由 編輯

          @Yaron

          I actually meant an option to copy the entire line even if part of it is selected.

          If I understand what you are wanting you can simply use editor:LineCopy()

          A context-menu in the Console Output field.

          Would be simple to add. If you want you can open a feature request on Github and we can discuss it more there.

          An option to change text direction (LTR/RTL) in the Console Input field.

          One of the change I made from PythonScript was replace the input field with a Scintilla control. So I’m not sure how easy this would be to change the text direction.

          1 條回覆 最後回覆 回覆 引用 0
          • guy038G
            guy038
            最後由 編輯

            Hello Dail,

            Thanks for your quick reply ! But, even before opening my laptop and seeing your post, this morning ( in France ! ), I had understood the differences between the two behaviours. Indeed, although I ran the copy and cut commands, with a previous selection, I did not see the differences, at first sight !

            Sorry. It would have saved you to reply me about this matter, as you, certainly, need time to develop your Lua plugin :-(

            Best Regards

            guy038

            BTW, it’s a chance that you give the Visual Studio’s method, about copy/cut text ! Because, the two commands editor:LineCopy() and editor:LineDelete() are absent, from your Lua Script documentation, at the address below :

            https://github.com/dail8859/LuaScript/blob/master/doc/editor.md

            1 條回覆 最後回覆 回覆 引用 0
            • YaronY
              Yaron
              最後由 編輯

              Hello dail,

              Thanks for replying.

              Yes, I was looking for ‘editor:LineCopy()’.
              Not finding it in the documentation page, I assumed it was not available.

              I’ve opened two issues on GitHub.

              Best regards.

              1 條回覆 最後回覆 回覆 引用 0
              • dailD
                dail
                最後由 編輯

                A new version has been release. v0.4.0

                Now with API documentation. https://dail8859.github.io/LuaScript/

                This release includes bug fixes, GUI enhancements, and a large portion of the Notepad++ message and notifications are available.

                As always, comments/questions are welcome.

                1 條回覆 最後回覆 回覆 引用 0
                • M
                  MaximilianKohler
                  最後由 MaximilianKohler 編輯

                  The startup script doesn’t seem to work with the PortableApps dot com version. I was trying to use this:

                  community.notepad-plus-plus dot org/topic/11233/disable-ascii-control-characters-shortcuts/5

                  I’ll post to the portableapps forum and see what they say:
                  portableapps dot com/node/70143

                  Alan KilbornA mpheathM 2 條回覆 最後回覆 回覆 引用 0
                  • Alan KilbornA
                    Alan Kilborn @MaximilianKohler
                    最後由 編輯

                    @MaximilianKohler said in [New Plugin] LuaScript:

                    with the PortableApps dot com version

                    This isn’t a supported version.
                    Best thing to do is not use it.
                    Notepad++ itself distributes a “portable” version – use that.

                    1 條回覆 最後回覆 回覆 引用 0
                    • mpheathM
                      mpheath @MaximilianKohler
                      最後由 mpheath 編輯

                      @MaximilianKohler Do a simple test to debug.

                      startup.lua:

                      -- Startup script
                      -- Changes will take effect once Notepad++ is restarted
                      
                      print('Hello World')
                      

                      Console:

                      Hello World
                      Lua 5.3.5  Copyright (C) 1994-2018 Lua.org, PUC-Rio
                      

                      With the PortableApps distribution of Notepad++, If you install a plugin and Notepad++ restarts then the environmental variables related to PortableApps are not set from that instance of Notepad++. You need to close that instance and start a new instance using Notepad++Portable.exe to have those environmental variables set. You can check by running CMD and use the command set from Notepad++ to see all the extra environmental variables that are added or values being modified.

                      1 條回覆 最後回覆 回覆 引用 1
                      • 第一個貼文
                        最後的貼文
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors