Community
    • Login

    Code formatter (notepad++ 64)

    Scheduled Pinned Locked Moved General Discussion
    9 Posts 4 Posters 57.1k Views 1 Watching
    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.
    • Andrey WsA Offline
      Andrey Ws
      last edited by

      How reformat code in notepead++ 64, like this:
      https://1drv.ms/u/s!AiIr0bOIHtsloiHiTdWpybsbM0GE

      #include <iostream>
      #include "sources/config.h"
      #include <memory>
      
              using std::cout;
              using std::endl;
              using std::shared_ptr;
      
      int main() 
      {     int SIZE = 5;
          std::cin >> SIZE;
                          shared_ptr<int[]> ptr(new int[SIZE]{1 , 34, 65, 23, 2});
                          for (int i = 0; i < SIZE; ++i) {
              ptr[i] = rand() % 10;
              cout << ptr[i] << endl;
          }}
      
      
      EkopalypseE Meta ChuhM 2 Replies Last reply Reply Quote 0
      • EkopalypseE Offline
        Ekopalypse @Andrey Ws
        last edited by

        @Andrey-Ws

        by using plugins like editor config or code alignment …

        1 Reply Last reply Reply Quote 0
        • Meta ChuhM Offline
          Meta Chuh moderator @Andrey Ws
          last edited by Meta Chuh

          welcome to the notepad++ community, @Andrey-Ws

          on 32 bit notepad++ one of the best plugins to reformat c++ code would be textfx, which is available at the built in plugins admin (notepad++ 7.6.x).
          the menu would be textfx > textfx edit > reindent c++ code as seen at the screencast below.

          Imgur

          unfortunately the textfx plugin is not available for your notepad++ 64 bit, so you would have to install and use notepad++ 7.6.4 32 bit from here: https://notepad-plus-plus.org/news/notepad-7.6.4-released.html

          note: there is an experimental version of textfx for x64, but currently exactly the c++ reindent feature is not working on that.
          here’s the link, if you want to play around with it: https://github.com/HQJaTu/NPPTextFX/blob/VS2017-x64/bin/x64/NppTextFX.dll

          1 Reply Last reply Reply Quote 1
          • Andrey WsA Offline
            Andrey Ws
            last edited by Andrey Ws

            Thanks, but TextFX not so good formatted like in clion (on video)…

            ps. what soft u use for gif?

            Alan KilbornA 1 Reply Last reply Reply Quote 0
            • Alan KilbornA Offline
              Alan Kilborn @Andrey Ws
              last edited by Alan Kilborn

              @Andrey-Ws

              https://www.screentogif.com/

              @Meta-Chuh

              Ooooooh, progress bar! Nice. :)

              Meta ChuhM 1 Reply Last reply Reply Quote 1
              • Meta ChuhM Offline
                Meta Chuh moderator @Alan Kilborn
                last edited by

                @Alan-Kilborn

                Ooooooh, progress bar! Nice. :)

                ps: i’ve posted the optimised settings for the progress bar here (just in case you haven’t seen them yet):
                https://notepad-plus-plus.org/community/topic/17273/how-to-install-webedit-plugin-why-is-it-not-visible-in-the-toolbar/22

                Alan KilbornA 1 Reply Last reply Reply Quote 1
                • Alan KilbornA Offline
                  Alan Kilborn @Meta Chuh
                  last edited by

                  @Meta-Chuh

                  Seen and duly noted. Nice job figuring it out.

                  1 Reply Last reply Reply Quote 1
                  • Andrey WsA Offline
                    Andrey Ws
                    last edited by Andrey Ws

                    Another nice plugin, but don’t format empty spaces between variables, etc…
                    https://github.com/akof1314/CoolFormat/issues/59

                    TextFX can format empty spaces ?

                    Meta ChuhM 1 Reply Last reply Reply Quote 0
                    • Meta ChuhM Offline
                      Meta Chuh moderator @Andrey Ws
                      last edited by

                      @Andrey-Ws

                      TextFX can format empty spaces ?

                      the best thing is, if you test everything yourself, by downloading the portable notepad++ 7.6.4. 32 bit from here:
                      https://notepad-plus-plus.org/repository/7.x/7.6.4/npp.7.6.4.bin.zip
                      (the portable version will work completely isolated from your installed version and is perfect for any testing. any settings or plugin installation you do at the portable version, will not modify anything at your installed version. that’s why many of us use this version for testing)

                      extract npp.7.6.4.bin.zip to your desktop.
                      start it by double clicking on notepad++.exe inside the npp.7.6.4.bin folder.
                      use the built in plugins admin to download textfx, or any other available plugins you would like to try.

                      happy testing.

                      1 Reply Last reply Reply Quote 0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      • First post
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors