Community

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

    Reverse Lines

    Help wanted · · · – – – · · ·
    3
    12
    1526
    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.
    • zhivkov007
      zhivkov007 last edited by

      Here is a plugin that does reverse lines but it is not complied:
      https://github.com/querykuma/qkNppReverseLines

      Is there any plugin available for end user that does reversing text?

      Alan Kilborn Michael Vincent 2 Replies Last reply Reply Quote 0
      • Alan Kilborn
        Alan Kilborn @zhivkov007 last edited by

        @djurzivk

        No plugin needed if you use Notepad++ 8.0 or later.

        30af560b-bc41-4c8d-8e71-078a06120981-image.png

        1 Reply Last reply Reply Quote 0
        • Michael Vincent
          Michael Vincent @zhivkov007 last edited by

          @djurzivk said in Reverse Lines:

          Here is a plugin that does reverse lines but it is not complied:

          It is compiled:

          https://github.com/querykuma/qkNppReverseLines/releases

          and it’s in the Plugin Admin to install nicely:

          f04dfe0c-8d9c-4f75-ab38-a64f58eeb7ee-image.png

          Cheers.

          zhivkov007 2 Replies Last reply Reply Quote 0
          • zhivkov007
            zhivkov007 @Michael Vincent last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • zhivkov007
              zhivkov007 @Michael Vincent last edited by

              @michael-vincent
              Ah, I see it is complied. Thanks!

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

                @djurzivk

                Is there some value in the plugin when the functionality is native in Notepad++?

                zhivkov007 2 Replies Last reply Reply Quote 0
                • zhivkov007
                  zhivkov007 @Alan Kilborn last edited by

                  @alan-kilborn
                  This does not the same. This plugin inverts the text.
                  text --> txet

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

                    @alan-kilborn
                    Ah you are right, it doesn’t reverse the text. Sorry for the confussion.
                    @Michael-Vincent
                    Yes, I need to reverse (selected) text, not lines.

                    zhivkov007 1 Reply Last reply Reply Quote 0
                    • zhivkov007
                      zhivkov007 @zhivkov007 last edited by

                      This one
                      https://github.com/mrt-prodz/NPP-Reverse-Text

                      Alan Kilborn Michael Vincent 2 Replies Last reply Reply Quote 0
                      • Alan Kilborn
                        Alan Kilborn @zhivkov007 last edited by

                        @djurzivk

                        If you are going to use a plugin, why not use PythonScript instead, example:

                        # -*- coding: utf-8 -*-
                        from __future__ import print_function
                        
                        from Npp import *
                        
                        (start_line, end_line) = editor.getUserLineSelection()
                        for line_nbr in range(start_line, end_line + 1):
                            line_contents = editor.getLine(line_nbr).rstrip("\n\r")
                            line_contents = line_contents[::-1]  # reverse string
                            print(line_contents)
                        
                        zhivkov007 1 Reply Last reply Reply Quote 0
                        • zhivkov007
                          zhivkov007 @Alan Kilborn last edited by

                          @alan-kilborn
                          I can’t use Python. :(

                          1 Reply Last reply Reply Quote 0
                          • Michael Vincent
                            Michael Vincent @zhivkov007 last edited by

                            @zhivkov007 said in Reverse Lines:

                            This one
                            https://github.com/mrt-prodz/NPP-Reverse-Text

                            Looks like that plugin hasn’t been touched in 7+ years and with the changes to N++ / Scintilla API between now and then - AND the recent (January 2022) breaking changes regarding support for >2Gb files … and what this plugin does with “text ranges” - I’m going out on a limb (without testing the compilation myself) that compiling it may fail and even if it does compile, it certainly won’t work with current versions of Notepad++ without a serious overhaul.

                            That said, you don’t need to “know” Python to use @Alan-Kilborn 's script, you just need to install the PythonScript plugin.

                            Cheers.

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