Community
    • Login

    [New Plugin] ExtSettings

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    56 Posts 12 Posters 10.4k 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.
    • guy038G
      guy038
      last edited by

      Hi, @dinkumoil, and All,

      Many thanks for your ( long !) comments, examples and for considering some of my requests !

      So, ok, the difference between Wrap mode options Word boundaries and Whitespace characters are rather particular and relative to languages !


      Regarding the Indentation guide style, I’m, now, able to easily see the differences between the 3 styles : Real indentation, Python style or Standard style

      I tested with the very small piece of C code :

      	while (1) {
      
      
      
      		if (result == None)
      			test = 'OK'
      			break;
      
      
      
      		result = 2
      	}
      

      and an analog Python code :

          while 1:
      
      
      
              if result = None:
                  test = 'OK'
                  break
      
      
      
              result = 2
      

      For both, there are 3 pure blank lines, before and after the if block

      I assumed that default indentation is a tabulation char of size 4 and Python one is a 4 spaces string

      Of course, @Dinkumoil, if I temporarily disable your plugin, by renaming the ..\Plugins\ExtSettings folder, we get the N++ default behavior, about Indentation guide lines ! That is to say :

      • Standard style, if current file is not a Python file

      • Python style, if current file is a Python file

      So, may be, it would be worth to add, in your plugin, a Default option, for the Indentation guide lines feature, which would let N++ decide, by itself ! What is your feeling about it ?


      This make me think of an other improvement. If, you ready to add multiple configurations, you could consider a default one, which leave all the N++ options unchanged. That is to say, with the values :

      • Backspace unindents : No

      • Folding lines : Yes

      • Indentation guide lines : Default ( New option )

      • White space style : Invisible

      • White space size : 2

      • Upper line spacing : 0

      • Lower line spacing : 0

      • Vertical Lines : None

      • Wrap mode : No line wrapping

      • End of Subline : Yes

      • Start of Subline : No

      • Line number margin : No

      • Subline end near text : No

      • Subline start near text : No

      • Highlighting style : Filled rounded box

      • Color : Green

      • Filling alpha : 100

      • Outline alpha : 50

      • Cursor beyond line endings : No

      • Wrap cursor at line start : Yes

      • Select full line : No

      • Selection alpha : 256

      • Multi Paste : Yes

      • Convert EOL on paste : Yes

      • Magnification : 0

      Cheers,

      guy038

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

        @guy038 said in [New Plugin] ExtSettings:

        So, may be, it would be worth to add, in your plugin, a Default option, for the Indentation guide lines feature, which would let N++ decide, by itself !

        I think about to remove the whole indentation guide line feature from my plugin. As you already noticed, Notepad++ now (since v7.8) switches to Python style by itself when it detects that the current active tab contains a Python code file and it switches to Standard style when it detects a non-Python file. Since this Scintilla setting has global scope, Notepad++ does this decision at every tab switch. I figured out that it does that even when changing the theme. So my plugin virtually has “to fight” against the build-in Notepad++ logic and, like when changing the theme, there are cicumstances it “looses” that fight. Since I don’t like non-robust features and I don’t want to fiddle around in Notepad++ too much, it’s likely to be the best to remove that feature.

        you could consider a default one, which leave all the N++ options unchanged.

        I think that’s not a good idea because the defaults of Notepad++ could change over time, thus I would have to synchronize my plugin with the changes in Notepad++. If a user wants a default configuration he only has to delete the settings file.

        1 Reply Last reply Reply Quote 3
        • Charles BogelC
          Charles Bogel
          last edited by

          First, thank you for your work on this plugin, I’ve found it very useful!

          I would like to report two small issues. The first is with adding vertical lines.
          Expected Behavior: I enter a column, I click “Add”, I get a new vertical line in that list in the bottom left.
          Actual Behavior: I enter a column, I click “Add”, and I get no response. I need to select a color first, even though the color picker implies that it’s defaulting to black.

          This behavior led me to believe your plugin was bugged until I looked into it more. Making this a bit more user-friendly by actually having it default to black (or grey if you’re worried about people using dark themes) would help.

          The second issue. With the Extended Settings menu open, when I alt-tab out of Notepad++, I cannot alt-tab back in.
          Expected Behavior: Open ExtSetting Menu. Alt-tab onto a window that covers Notepad++. Alt-tab back to Notepad++. Notepad++ should be the top-level window graphically and in the alt-tab menu.
          Actual Behavior. Open ExtSetting Menu. Alt-tab onto a window that covers Notepad++. Alt-tab back to Notepad++. Notepad++ is not the top-level window graphically, but IS the top-level window in the alt-tab menu.

          dinkumoilD 1 Reply Last reply Reply Quote 3
          • dinkumoilD
            dinkumoil @Charles Bogel
            last edited by dinkumoil

            @Charles-Bogel

            Thank you for your issue reports. You are absolutely right with both of them. Unfortunately I’m very busy in my job for the next months. So, don’t expect a short-time fix, sorry.

            1 Reply Last reply Reply Quote 2
            • cmeriauxC
              cmeriaux
              last edited by

              @dinkumoil
              Thanks for this nice plugin.
              Is it possible to add on the UI a button to apply the configuration ?

              Thanks

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

                @cmeriaux

                You mean applying the settings without closing the dialog? I already thought about it. I agree it would be useful.

                But as I said, currently I’m so busy in my job that I’m happy to be off-keyboard late in the evenings and even at the weekends.

                cmeriauxC 1 Reply Last reply Reply Quote 3
                • cmeriauxC
                  cmeriaux @dinkumoil
                  last edited by

                  @dinkumoil yes that’s it. You perfectly got my point ;-)

                  Are you on github ? Any chance that someone else can contribute ?

                  dinkumoilD 1 Reply Last reply Reply Quote 0
                  • dinkumoilD
                    dinkumoil @cmeriaux
                    last edited by dinkumoil

                    @cmeriaux

                    The plugin is hosted at SoureForge in an SVN repository and is written with Delphi XE2. If you have an SourceForge account we can talk about collaboration. Another possibility would be to exchange *.patch files.

                    1 Reply Last reply Reply Quote 1
                    • cmeriauxC
                      cmeriaux
                      last edited by

                      @dinkumoil said in [New Plugin] ExtSettings:

                      Delphi XE2

                      It would have been nice but I don’t know anything in Delphi XE2
                      sorry

                      1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User
                        last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • J
                          Jeb Dude
                          last edited by

                          @dinkumoil

                          In Notepad++ v7.9.1 32-bit the settings are not being saved.

                          Any chance of an update?

                          dinkumoilD 1 Reply Last reply Reply Quote 0
                          • dinkumoilD
                            dinkumoil @Jeb Dude
                            last edited by dinkumoil

                            @Jeb-Dude

                            In Notepad++ v7.9.1 32-bit the settings are not being saved.

                            I’m not able to reproduce that with a portable v7.9.1 32 bit.

                            Any chance of an update?

                            It’s in the pipeline, but it may still take a while.

                            PeterJonesP 1 Reply Last reply Reply Quote 0
                            • PeterJonesP
                              PeterJones @dinkumoil
                              last edited by

                              @dinkumoil ,

                              I just had the strangest bug, that appears to be in (or at least affected) ExtSettings v1.2.1. The ExtSettings.ini file got corrupted to be all NULL bytes! I didn’t have a Notepad++ crash, so I’m not sure what could have caused that. And it seemed to happen in the middle of a Notepad++ editing session.

                              Backstory and debug: I woke my computer this morning, and was working in a web editor in my browser.
                              I think I had done selecting earlier this morning without difficulty, but I’m not 100% sure. But this time, when I went to copy some text from Notepad++ to my browser, and the selection highlighting was gone in Notepad++. I checked Style Configurator, which showed proper Selected text colour. Restarting Notepad++ didn’t fix it; rebooting didn’t fix it; I verified other apps still highlighted properly. Running a fresh portable unzip of Notepad++ didn’t have the problem – so I knew it was something specific to my normal instance of Notepad++. I temporarily renamed all my normal Notepad++ config files and restarted, to make sure that stylers.xml or something else hadn’t been corrupted, but still no highlighting. Disabled all my plugins, and the problem went away. Restored my normal config files with plugins disabled, and highlighting still worked. Enabled all the plugins and the problem returned, so confirmed it was a plugin problem of some sort. Enabling one at a time narrowed it down to highlighting stopped working when ExtSettings was loaded. I renamed ExtSettings.ini and restarted with ExtSettings enabled, and everything worked normally. I changed a setting in there (to force it to save a new ExtSettings.ini) and restarted, and it was still working. When I compared the renamed file to the new ini, I saw that the old/renamed version was 153 bytes of NULL, instead of 153 bytes of ini text.

                              So it sounds similar to the old Notepad++ NULL bug, but it’s with the ExtSettings.ini file. I haven’t ever manually edited the ExtSettings.ini file directly in Notepad++, so I don’t think it was a problem with the editor directly. And I hadn’t recently made any changes to the ExtSettings through the plugin GUI, so I am not sure why it would have been trying to write/edit the INI yesterday or today. There has not been a recent crash of my OS or of Notepad++. I know that yesterday, I wasn’t having any difficulty selecting text, so the NULL corruption either happened while just in the course of normal Notepad++ editing this morning, or it happened when my computer went to sleep last night and/or when it woke up this morning. So, I unfortunately don’t have a repeatable circumstance for you to try to replicate the bug. (I know, I hate it when others report bugs without a repeatable circumstance.)

                              @dinkumoil , When you create/open/write the INI file, are you using ‘CreateFile’ or similar API calls? If so, are you using the FILE_FLAG_WRITE_THROUGH to make sure it writes right away, rather than caching first? If you need help, I know that @pnedev is an expert on that now. :-)

                              Notepad++ v7.9.2   (64-bit)
                              Build time : Dec 31 2020 - 04:01:34
                              Path : C:\usr\local\apps\notepad++\notepad++.exe
                              Admin mode : OFF
                              Local Conf mode : ON
                              OS Name : Windows 10 Enterprise (64-bit) 
                              OS Version : 1903
                              OS Build : 18362.1256
                              Current ANSI codepage : 1252
                              Plugins : ComparePlugin.dll ExtSettings.dll HexEditor.dll LuaScript.dll MarkdownViewerPlusPlus.dll mimeTools.dll NppConsole.dll NppConverter.dll NppEditorConfig.dll NppExec.dll NppExport.dll NppFTP.dll NppUISpy.dll PreviewHTML.dll PythonScript.dll QuickText.dll TagLEET.dll XMLTools.dll 
                              
                              dinkumoilD 1 Reply Last reply Reply Quote 2
                              • dinkumoilD
                                dinkumoil @PeterJones
                                last edited by

                                @PeterJones

                                For writing the settings file I use a Delphi class that encapsulates the handling of INI files. AFAIK this class uses some Windows APIs for INI files (e.g. GetPrivateProfileString). Thus I don’t know if buffered write comes into play when the file is saved.

                                The plugin’s INI file is written when its dialog is closed (the dialog’s window is destroyd as well in this moment). That means the last change of this file happened when you used the plugin for the last time. Thus, I have no clue what could have caused NUL-ing the INI file - especially as you wrote

                                I hadn’t recently made any changes to the ExtSettings through the plugin GUI, so I am not sure why it would have been trying to write/edit the INI yesterday or today.

                                Sorry, I have no idea how this could have happend and how to reproduce this incident.

                                1 Reply Last reply Reply Quote 2
                                • astewart77A
                                  astewart77
                                  last edited by

                                  I have an apparent compatibility problem with Notepad++ V8 and ExtSettings 1.2.1. The Vertical Lines settings are greyed out and the list is empty
                                  window.png
                                  even though my ExtSettings.ini

                                  [Header]
                                  Version=1.0
                                  [Settings]
                                  BackspaceUnindents=0
                                  FoldingLines=0
                                  IndentationGuideStyle=0
                                  WhiteSpaceStyle=0
                                  WhiteSpaceSize=4
                                  UpperLineSpacing=-2
                                  LowerLineSpacing=-1
                                  LineWrappingMode=0
                                  LineWrappingMarkerType=$00000003
                                  LineWrappingMarkerLocation=$00000003
                                  MatchHighlightingStyle=6
                                  MatchHighlightingColor=$0000FF00
                                  MatchHighlightingFillAlpha=100
                                  MatchHighlightingOutlineAlpha=255
                                  CursorBeyondLineEndings=0
                                  WrapCursorAtLineStart=0
                                  SelectFullLine=0
                                  SelectionAlpha=256
                                  MultiPaste=1
                                  ConvertEolOnPaste=1
                                  PrintingMagnification=-1
                                  VerticalLine0=100;$00FFFF00
                                  VerticalLine1=130;$00808080
                                  
                                  

                                  still has entries set up with Notepad++ 7.9.5.

                                  I also have 100 130 set in n++ own preferences, but when n++ starts, the lines are gone. If I re-enter 100 130 in preferences, they re-appear. If I open and close the ExtSettings dialog, they are gone again.

                                  If I enter just 100 in preferences WITHOUT background mode and open/close ExtSettings dialog, it changes from a line to background mode highlighting at 100.

                                  All was well in 7.9.5…

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

                                    @astewart77

                                    Thank you for your bug report. I can confirm this is a bug. I will fix it when I have some spare time, but this can take a while. Due to dark mode related changes there are some other things to fix, too.

                                    For future bug reports: Please use the issue tracker of the plugin at SourceForge when possible.

                                    astewart77A Page WeilP 2 Replies Last reply Reply Quote 3
                                    • astewart77A
                                      astewart77 @dinkumoil
                                      last edited by

                                      @dinkumoil said in [New Plugin] ExtSettings:

                                      @astewart77

                                      I will fix it when I have some spare time, but this can take a while.

                                      Probably just as well to wait for the dust to settle on v8 before bothering. ExtSettings is still a high value plugin even with a little breakage.

                                      1 Reply Last reply Reply Quote 3
                                      • Page WeilP
                                        Page Weil @dinkumoil
                                        last edited by

                                        @dinkumoil

                                        For anyone finding this in 2022, Notepad++ v8.4.5 (and probably earlier versions too) has this functionality built in.

                                        To set the vertical lines go to: Preferences -> Margins/Border/Edge

                                        Under “Vertical Edge Settings” put in the column number you want each line to show up at, separated by a space

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

                                          After a long waiting time the new version 1.3 of the ExtSettings plugin has been released.

                                          Some settings have been removed because Notepad++ has evolved, thus they were obsolete now. Other settings have been added because users have asked for them. Also some bugs have been fixed, for example the plugin erroneously deactivated some of its features from Notepad++ v8.0 onwards.

                                          This is the new UI with new features marked in red (on Notepad++ v8.4.8, in older versions some options will be not available):

                                          08c3e1da-5d2c-41f3-bad8-461dd1ff1073-grafik.png

                                          Have fun!


                                          Change log since v1.2.2

                                          v1.3 - January 2023

                                          • changed: Removed feature “multiple vertical lines” as it can be configured in Notepad++ natively since v7.8.6.
                                          • changed: Settings regarding smart highlighting (previously called “search match highlighting”) have been renamed to follow official naming in Notepad++.
                                          • enhanced: Added setting for sticky cursor mode.
                                          • enhanced: Added settings for text tag that can be shown to the right of first line of a folded code block (available in Notepad++ v7.8 and newer).
                                          • enhanced: Added settings for text color of selected text.
                                          • fixed: White space size setting is reset to Notepad++ default value when white space indicators are toggled on or off.
                                          • fixed: Smart highlighting color is reset to Notepad++ default value when switching to another tab.

                                          v1.2.2 - November 2022

                                          • fixed: When plugin’s dialog boxes are on screen but hidden by another application’s window which has input focus, it is not possible to return to Notepad++ by clicking its taskbar icon.
                                          • fixed: Wrong implementation of Notepad++ version comparison.
                                          • enhanced: Added support for Dark Mode icons.
                                          • enhanced: Added new Notepad++ message constants from v7.9.2 up to v8.4.7
                                          • enhanced: Added new Notepad++ menu command ids from v7.9.6 up to 8.4.7
                                          • enhanced: Added new Scintilla constants from v4.4.6 up to v5.3.1
                                          • enhanced: Adapted to new Scintilla v5.3.1 API of Notepad++ v8.4.7
                                          Alan KilbornA 2 Replies Last reply Reply Quote 5
                                          • Alan KilbornA
                                            Alan Kilborn @dinkumoil
                                            last edited by

                                            The download link is at the top of this thread, but for convenience I’ll drop it right here next to the 1.3 announcement:

                                            https://sourceforge.net/projects/extsettings/files/

                                            Note that until the release of the next version of Notepad++ after 8.4.8, this new version of ExtSettings won’t appear in Plugins Admin and would need to be installed manually. (Assumes dinkumoil does what’s necessary to make it appear there, post 8.4.8)

                                            dinkumoilD 1 Reply Last reply Reply Quote 3
                                            • First post
                                              Last post
                                            The Community of users of the Notepad++ text editor.
                                            Powered by NodeBB | Contributors