Community
    • Login

    How can I hide the horizontal lines that appear when I fold a block?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    13 Posts 4 Posters 4.7k 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.
    • Scott SumnerS
      Scott Sumner @dinkumoil
      last edited by

      @dinkumoil

      I have some passing familiarity with the NppExec plugin (the Pythonscript plugin serves me better for what I want/need to do…) but as I read this I was thinking that the OP would want to make this change one time only (and then forget about it). That led me to wonder if NppExec is capable of running its little scripts on startup of Notepad++ (or more accurately, startup of NppExec itself).

      1 Reply Last reply Reply Quote 1
      • dinkumoilD
        dinkumoil
        last edited by

        @Scott-Sumner

        Yes, the NppExec plugin is able to start a script on startup of Notepad++.

        Scott SumnerS 1 Reply Last reply Reply Quote 3
        • Scott SumnerS
          Scott Sumner @dinkumoil
          last edited by Scott Sumner

          @dinkumoil

          NppExec plugin is able to start a script on startup

          Ha. Well, I was hopeful you’d elaborate more on how to do that, not really for me (I could look it up) but more for the OP (maybe a real noob?) and future thread readers! :-)

          (Of course, the OP could also “look it up”)

          1 Reply Last reply Reply Quote 0
          • Jim DaileyJ
            Jim Dailey
            last edited by

            The NPP Exec documentation says you can add a script name to the options section of its INI file (plugins\Config\NppExec.ini) like this:

            [Options]
            ScriptNppStart="<some existing script>"
            

            Here’s a part of the documentation from file plugins\doc\NppExec_TechInfo.txt:

             ScriptNppStart
             --------------
               You can specify here a name of existing script which you want to be
               executed each time when Notepad++ starts.
               For example, this script can contain declarations of your own variables
               (using SET command), some welcome messages (using ECHO command) or
               whatever command(s) you want.
               Note: if you specify an empty value or non-existent script name for
               this option, no script will be executed when Notepad++ starts.
               See also: ScriptNppExit.
            
            1 Reply Last reply Reply Quote 4
            • dinkumoilD
              dinkumoil
              last edited by

              @Scott-Sumner said:

              I was hopeful you’d elaborate more on how to do that

              No problem, if the OP decides to accept my suggestion. If he prefers the Pythonscript plugin, the LUAscript plugin, the AutomationScripts/NppScripts plugin (C#, by Oleg Shilo) or … (maybe there are more) I can not help him.

              @Scott-Sumner said:

              Of course, the OP could also “look it up”

              That’s what I had in mind too, but if he runs in trouble I’m willing to help. The steps to install and properly configure the NppExec plugin take a long list. If it is not neccessary to type all that stuff I’m happy.

              1 Reply Last reply Reply Quote 1
              • dinkumoilD
                dinkumoil
                last edited by

                @Jim-Dailey said:

                The NPP Exec documentation says you can add a script name to the options section of its INI file

                All neccessary stuff can be configured via the plugin’s GUI (Plugins (menu) -> NppExec -> Execute... and Plugins (menu) -> NppExec -> Advanced Options...), no need to fiddle around with INI files.

                1 Reply Last reply Reply Quote 3
                • Jim DaileyJ
                  Jim Dailey
                  last edited by

                  @dinkumoil
                  Yes, much easier to use the advanced options UI to do the editing of the .INI file! I don’t know if I ever looked at that menu entry before. Thanks for pointing it out!

                  1 Reply Last reply Reply Quote 1
                  • rodrigodesalvobrazR
                    rodrigodesalvobraz
                    last edited by

                    Thank you all for your help.

                    I was able to install NppExec and run the command to turn the lines off, and it worked.

                    I tried configuring NppExec to run a script at Notepad++ startup, but I was unable to do it on the “Advanced Options” menu that dinkumoil suggested. While I see the option to select a script for startup, it requires the script to be selected from a pull-down menu that is however empty. I could not find a way to add scripts to it. I tried finding instructions for that in the NppExec documention but I was unable to find them.

                    I also tried adding the script via NppExec.INI file but that did not work either. I assumed <some existing script>
                    [Options]
                    ScriptNppStart=“<some existing script>”
                    to stand for a full path name of the file containing the instructions, but perhaps this assumption is incorrect.

                    Thank you.

                    1 Reply Last reply Reply Quote 1
                    • dinkumoilD
                      dinkumoil
                      last edited by dinkumoil

                      @rodrigodesalvobraz

                      Yes, NppExec is somewhat complicated in this point.

                      1. Open (menu) Plugins -> NppExec -> Execute....
                      2. Type your command into the code box (e.g. sci_sendmsg SCI_SETFOLDFLAGS 0).
                      3. Click on Save....
                      4. Type a name for your command into the combobox (e.g. FoldingLinesOff).
                      5. Click Save.
                      6. If you want to have a script to turn folding lines on again repeat steps 2 to 5 with the command sci_sendmsg SCI_SETFOLDFLAGS 16 and give it the name FoldingLinesOn.

                      Now you can select these scripts in the combobox under (menu) Plugins -> NppExec -> Advanced Options... -> (group box) Advanced options.

                      If you want to create menu entries in the Macro menu which you can assign to keyboard shortcuts use the UI in the Menu items group box. Type a name in Item name input field and select a script in the Associated script combobox. After a restart of Notepad++ go to (menu) Settings -> Shortcut Mapper -> (tab) Plugin commands and assign the shortcuts you want.

                      1 Reply Last reply Reply Quote 4
                      • rodrigodesalvobrazR
                        rodrigodesalvobraz
                        last edited by

                        Very good, thank you, now things work as I wanted. :-)

                        1 Reply Last reply Reply Quote 1
                        • Victorel PetrovichV Victorel Petrovich referenced this topic on
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors