• Login
Community
  • Login

Code formatter (notepad++ 64)

Scheduled Pinned Locked Moved General Discussion
9 Posts 4 Posters 50.8k Views
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.
  • A
    Andrey Ws
    last edited by Mar 20, 2019, 10:37 AM

    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;
        }}
    
    
    E M 2 Replies Last reply Mar 20, 2019, 12:10 PM Reply Quote 0
    • E
      Ekopalypse @Andrey Ws
      last edited by Mar 20, 2019, 12:10 PM

      @Andrey-Ws

      by using plugins like editor config or code alignment …

      1 Reply Last reply Reply Quote 0
      • M
        Meta Chuh moderator @Andrey Ws
        last edited by Meta Chuh Mar 20, 2019, 12:13 PM Mar 20, 2019, 12:13 PM

        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
        • A
          Andrey Ws
          last edited by Andrey Ws Mar 20, 2019, 12:27 PM Mar 20, 2019, 12:25 PM

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

          ps. what soft u use for gif?

          A 1 Reply Last reply Mar 20, 2019, 12:30 PM Reply Quote 0
          • A
            Alan Kilborn @Andrey Ws
            last edited by Alan Kilborn Mar 20, 2019, 12:31 PM Mar 20, 2019, 12:30 PM

            @Andrey-Ws

            https://www.screentogif.com/

            @Meta-Chuh

            Ooooooh, progress bar! Nice. :)

            M 1 Reply Last reply Mar 20, 2019, 12:37 PM Reply Quote 1
            • M
              Meta Chuh moderator @Alan Kilborn
              last edited by Mar 20, 2019, 12:37 PM

              @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

              A 1 Reply Last reply Mar 20, 2019, 1:05 PM Reply Quote 1
              • A
                Alan Kilborn @Meta Chuh
                last edited by Mar 20, 2019, 1:05 PM

                @Meta-Chuh

                Seen and duly noted. Nice job figuring it out.

                1 Reply Last reply Reply Quote 1
                • A
                  Andrey Ws
                  last edited by Andrey Ws Mar 20, 2019, 1:17 PM Mar 20, 2019, 1:16 PM

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

                  TextFX can format empty spaces ?

                  M 1 Reply Last reply Mar 20, 2019, 1:37 PM Reply Quote 0
                  • M
                    Meta Chuh moderator @Andrey Ws
                    last edited by Mar 20, 2019, 1:37 PM

                    @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
                    3 out of 9
                    • First post
                      3/9
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors