• AnalysePlugin version 1.13-R49 available

    1
    5 Votes
    1 Posts
    287 Views
    No one has replied
  • Remove the external lexer support due to Scintilla 5

    36
    3 Votes
    36 Posts
    4k Views
    Shridhar KumarS

    @bas-de-reuver this is an optional suggestion for the PropertySet function. It can be made a bit more robust by processing only for the supported properties by having else if (SupportedProperties.ContainsKey(name)) instead of the last else. Like so:

    if ((name == "separator") && (value.Length > 0)) { separatorChar = value[0]; } else if (name == "fixedwidths") { fixedWidths = value.Split(',').Select(int.Parse).ToList(); separatorChar = '\0'; } else if (SupportedProperties.ContainsKey(name)) { SupportedProperties[name] = value == "0" ? false : true; }
  • XMLTools not compatible with Notepad++ 7.5.8 64-bit

    10
    0 Votes
    10 Posts
    33k Views
    Praveen KP

    XMLTool, Xml Tools 2.4.9.2 x64 Unicode.zip.

    Once you unzip the Xml Tools 2.4.9.2 x64 Unicode.zip then you will see the folder structure below.
    C:\Program Files\Notepad++\plugins\2.4.9.2 x64 Unicode

    Open the dependencies folder. You will find all the dlls.
    Copy all the dll to the folder consisting of Notepad++.exe, except XMLTools.dll in Notepad++ plugins folder.

  • ComparePlugin crashes on Notepad++ 8.2.2 test builds

    12
    4 Votes
    12 Posts
    6k Views
    JamesWebbJ

    @michael-vincent I have done. Thanks.

  • Json Plugin not working well after upgrading to latest version

    3
    0 Votes
    3 Posts
    350 Views
    rdipardoR

    @shayginat, have a look at Notepad++ 8.3.2 doesn’t work with JSON Viewer plugin 1.4.0.

    Unfortunately the source of the problem hasn’t been discovered yet. Sometimes it helps to trash everything under %AppData%\Notepad++ before major version jumps.

  • Icons by filetype thread 2

    3
    -2 Votes
    3 Posts
    439 Views
    ThespikedballofdoomT

    Even though I’m not asking for icons to be made, I’m just asking for the ability to associate them if they exist, I doubt that any developer of the project would ever be willing to implement that, so instead I’m gonna link this method here for any wandering into this thread wanting what I want.

    Special thanks to nicholas, I’m gonna spam this script everywhere on my system, I didn’t know it was this easy to manipulate icons.

    https://community.notepad-plus-plus.org/topic/22760/different-icons-for-file-extensions/3?_=1652831346795
    @nicholas said in Different icons for file extensions:

    Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.css\OpenWithProgids] "Notepad++.css"="" [HKEY_CLASSES_ROOT\Notepad++.css] @="CSS Source File" [HKEY_CLASSES_ROOT\Notepad++.css\DefaultIcon] @="C:\\Program Files\\Microsoft VS Code\\resources\\app\\resources\\win32\\css.ico" [HKEY_CLASSES_ROOT\Notepad++.css\shell] [HKEY_CLASSES_ROOT\Notepad++.css\shell\open] [HKEY_CLASSES_ROOT\Notepad++.css\shell\open\command] @="\"C:\\Program Files (x86)\\Notepad++\\notepad++.exe\" \"%1\""

    Replace .css with the file extension you want. Set the DefaultIcon path to what you want to use. If using x64 version of Notepad++ then remove the (x86). Save the file with a .reg extension and then run it.

    Next time you open a file you will be prompted to choose an application open with. Select Notepad++ and then the icons should update.

  • 0 Votes
    3 Posts
    239 Views
    rdipardoR

    @abc-memento,

    Sounds like a duplicate of this issue, judging from the title: NppFTP sends NPPM_RELOADFILE message to N++ when “No” is clicked in file reload dialog

    It should be in fixed in NppFTP 0.29.9 (stable) and 0.30.12 (pre-release with newer OpenSSL libs)

  • HTML Tag Failure

    3
    0 Votes
    3 Posts
    542 Views
    rdipardoR

    Hopefully this won’t be a problem in future Notepad++ versions

    Confirmed.

    npp_8.4.1_x64_rc.png

  • Python Script

    3
    0 Votes
    3 Posts
    462 Views
    Tracy SaundersT

    @peterjones said in Python Script:

    @tracy-saunders ,

    Yes. You can download an alpha/pre-release version of the PythonScript plugin from their releases page. The versions numbered 3.0.__-alpha use Python 3.x – and the more recent ones are on 3.10.

    Thank you!

  • Плагин расширенного поиска

    3
    0 Votes
    3 Posts
    2k Views
    guy038G

    Hello, @pavel-san, @terry-r and All,

    As @terry-r said, there are a lot of questions concerning your requests !!

    First, when you speak of text-1 do you mean :

    The word, as in the sentence “This abc text-1 xyz is right, but not abctext-1xyz

    The string as in the sentence “This abctext-1xyz is right, as well as abc text-1 xyz

    Secondly, do you mind about the case of letters in text-1 and/or text-2 ?

    In other words, must the string text-1 have :

    The exact case text-1

    Are the Text-1, TEXT-1, text-1 and tExT-1 syntaxes all OK ?

    Idem for text-2 !

    Now, your first statement :

    you need to find text-1 and from text-1 find up or down the occurrence of text-2 and then replace text-1 or text-2 with text-3.

    can be slipt into two different goals :

    (A) you need to find text-1 and from text-1 find up or down the occurrence of text-2 and then replace text-1 with text-3

    (B) you need to find text-1 and from text-1 find up or down the occurrence of text-2 and then replace text-2 with text 3

    But, in this case, this could also be expressed as :

    (A) Change text-1 with text-3, if current file contains, at least, one occurrence of text-2

    (B) Change text-2 with text-3, if current file contains, at least, one occurrence of text-1

    Case (A) could be achieved with the regex S/R :

    SEARCH (?s)(?=.*text-2).*?\Ktext-1

    REPLACE text-3

    Tick the Wrap-around option

    Select the Regular expression search mode

    Click once on the Replace All button

    Case (B) could be achieved with the regex S/R :

    SEARCH (?s)(?=.*text-1).*?\Ktext-2

    REPLACE text-3

    Tick the Wrap-around option

    Select the Regular expression search mode

    Click once on the Replace All button

    Finally, your second statement is :

    You have to find text-1, and then move from the text-1 to the left or to the right by a given number of characters, and then replace it starting from this position

    Many questions !

    Do you want to find all occurrences of text-1 or a specific one ?

    What you want to replace ( an exact number of chars, the next word, an exact string or even some text splited on several lines ? )

    Anyway, here is a first idea :

    To get the zero-length position, after text-1 and N characters on the right, use the search regex :

    (?-s)text-1.{N}\K

    To get the zero-length position, before text-1 and N characters on the left, use the search regex :

    (?-s)\K(?=.{N}text-1)

    See you later,

    Best Regards,

    guy038

  • How to set a lexer from a plugin?

    4
    1 Votes
    4 Posts
    404 Views
    dinkumoilD

    @dail

    Ah, OK. Now I understand why YOU asked that question. ;-)

  • Importing PythonScript Library to IDE

    11
    0 Votes
    11 Posts
    1k Views
    John Doe 1J

    @peterjones There’s no need for an apology, you’ve been a great deal of help in learning Notepad++ development. I truly appreciate all of the demonstrations you’ve provided and they were very helpful. I would advise you not to take a break from this forum, you’ve helped a lot and I am sure there are others that could use your assistance. I can be a bit hard headed at times which can lead to frustration and I am sorry for that. Have a great one! : - )

  • PythonScript Toggleable Script?

    34
    0 Votes
    34 Posts
    3k Views
    John Doe 1J

    @alan-kilborn You’re exactly correct, this has been a great learning experience for me regarding Notepad++ plugin development. I plan to continue improving my current plugins and write new ones. Once again thank you @Alan-Kilborn and @PeterJones for pointing me in the right direction, you’ve been helped a great deal! : - )

  • PythonScript: Check If Notepad++ Was Closed To Terminate an Infinite Loop

    14
    0 Votes
    14 Posts
    964 Views
    John Doe 1J

    @peterjones Yeah that is my concern, I’m gonna work on this some more later to see if I can get the script all cleaned up so that is no longer an issue. Thanks for your help so far!

  • Interesting behavior from editor.getFirstVisibleLine()

    7
    0 Votes
    7 Posts
    366 Views
    PeterJonesP

    @alan-kilborn ,

    Do we know of any workarounds in order to get good data?

    Yes, like I showed above, editor.docLineFromVisible(editor.getFirstVisibleLine()), gives the actual document line number as derived from the display line number. Hence, the correct 75 that got printed on the second line in the final example box.

    Addenda:

    As implied in the editor section of the PythonScript docs when searching for “display line”, the visible line’s number is influenced by hidden lines and line wrapping. The “document line” is the real underlying line number for the line in the file. So there are a few conversion helpers: visibleFromDocLine converts the “document line” into the “display line”; docLineFromVisible converts the “display line” into “document line”; and wrapCount gives the number of “display lines” necessary to render the given “document line”. (All the other mentions of “display line” have to do with where HOME and END and their related commands end up.)

    Similarly, if you want to set the first visible line (to scroll) based on an actual document line number, it would be editor.setFirstVisibleLine(editor.visibleFromDocLine(actualLineNumber))

  • PythonScript and Customize Toolbar Question

    9
    0 Votes
    9 Posts
    714 Views
    Alan KilbornA

    @john-doe-1 said in PythonScript and Customize Toolbar Question:

    if the user does not turn off Column Mode before closing Notepad++ the “Alt” key remains pressed, this is of course a bit of an issue. If you know of a way to detect when Notepad++ is tabbed out of or closed I would appreciate your help.

    This is bringing the discussion back to the other script you hinted at in your first posting in this thread. See HERE for that other thread, and some ideas about the “Alt” key.

  • occurences or comparison with a list

    9
    0 Votes
    9 Posts
    1k Views
    guy038G

    Hi, @chamzon-chamzon, @lycan-thrope, @peterjones and All,

    OK… I understand that in real cases, this causes a complete failure of the regex engine :-(( Why ?

    Well, let’s suppose the temporary file containing, first, your entire firewall configuration file followed with your entire IP-adresses list file

    Now, imagine the worst case : an unique match between the first IP-address of your firewall configuration file and the last IP-address of your IP-adresses list

    Then, and despite I use a non-capturing regex group, the part of the regex (?s:.*?...) represents all the characters, included line-endings, right after the first IP-address till the same IP-address excluded, at the very end of file

    As you said that your firewall configuration file has about 68,000 lines, it’s easy to guess that it probably exceeds the capacity of the regex engine to handle such a gap of chars !!

    So, in order to find out, somehow, a work-around to this situation, could you give me :

    The number of lines of your firewall configuration file and its approximate size

    The number of lines of your IP-addreses list and its approximate size

    A short example of your real firewall configuration file

    A short example of your real IP-addresses list

    In order to get the raw text, click on that button, when writing your post, to insert text in the right way !

    41d95003-7608-410a-958d-539e9c906c41-Capture d’écran 2022-03-07 123711.png

    Thanks for your time to collect these infos !

    Best Regards,

    guy038

  • 0 Votes
    6 Posts
    1k Views
    J KoJ

    @klaus-isbruchdn try disabling the XML tools --> Enable XML syntax auto-check

  • Bypassing the download process when installing plugins

    4
    0 Votes
    4 Posts
    321 Views
    Alan KilbornA

    @e5584071

    Can you follow the steps above to obtain and install it, or do you really need someone to walk you through the process specifically with the Compare plugin?

  • Add Loading Screen to Script?

    4
    0 Votes
    4 Posts
    499 Views
    John Doe 1J

    @PeterJones Thanks for your input and search advice, it is much appreciated. @Alan-Kilborn Yeah that is what I ended up doing, funny we had the same thought. The loading screen seems to be too much of a time sink for right now. Maybe later on in development.