• 0 Votes
    7 Posts
    399 Views
    th chT

    @PeterJones
    🙄It looks strange that an app with many abilities like notepad++ hasnt this simple ability.
    I guess for the same reason i cant open notepad++ (new document) with a selected theme.
    It will be nice these 2 abilities to added at an update.
    Thanks for your time and explanation.

  • Colored intermittent blobs

    4
    0 Votes
    4 Posts
    283 Views
    mkupperM

    For now I have turned DirectWrite off per @Coises’ advice. I had turned DirectWrite on per this thread from April 2023

    The video drivers seem to be up to date, or at least Windows Updates, plus “check for updates” at the driver level claim that things are up to date. There was an update for my monitor which I installed.

    I suspect it’s something triggered by Notepad++ or Scintilla. If it pops up again I’ll see if the glitch gets cleared by clicking with the mouse, etc. I normally use Alt+Tab to switch applications.

    I don’t feel like uninstalling Windows updates per what @Ekopalypse dealt with as the blobs issue has been going on for several months. My first screen shot of one was on February 8th. The blobs don’t happen often and when I notice one they have been “fragile” in that they vanish as I try to do anything.

    At least I have been able to capture them using screen shots. That in itself proves they exist and that Windows knows they are on the screen meaning they are not artifacts created the video hardware and/or monitor.

    The unrelated missing right parentheses issue was quickly resolved by @donho.

  • "Exception reason: Access violation" in notepad++

    9
    0 Votes
    9 Posts
    2k Views
    kot kotK

    @PeterJones
    Many thanks for Your help :)
    I’ll try to fix it myself

  • Help with the construction of a regular expression

    4
    1 Votes
    4 Posts
    392 Views
    GrafG

    Thanks for the tips. Especially for the link with examples of text search in a separate zone. I broke my head, but I found my own option.

    (?-si:<connection connection=".+\n.+class="ship.+owner="player".+\n|(?!\A)\G)(?s-i:(?!<\/people>\n).)*?\K(?-si:(<skill.+\n)+)

    But another problem has emerged. as I understand it, due to the large file size (~500 MB and ~13.5 million lines) I get an error if there are about 1 million lines between the areas with the data I need. That is, for example, I search first class="ship.+owner="player" throughout the file and get a normal result - 32 matches in the entire file.

    b9631a07-3395-4af8-8d1b-986b63a77044-image.png

    But if I try to execute my regular expression from the beginning of the file, there will be a regular expression error message (invalid regular expression).

    If i place the cursor inside any of the zones and use marks, then all the matches from all the zones will change if, as I found out, there are less than 1 million lines between them.

    Or if i place the cursor inside the zone with the desired text (but after which, the next zone of interest will start after at least a million lines) and sequentially perform “find next”, then the search will continue normally until it reaches the </people> tag, after which, as I understand it, the search should begin the next zone, however, will again receive a regular expression error message.

    I tried to find out what the error is on various online resources for checking regular expressions, but they can’t cope with such a volume of strings. I also did not find offline tools for such a task, maybe I was looking for it badly.

    And as I understand it at the moment, the problem is not in the regular expression itself, but in the limitation of the search engine. Maybe someone has come across something like this or knows a suitable tool?
    At the moment, I’m thinking about trying to write something suitable for this task in python.

    P.S. How can I hide anything under the spoiler?

    P.P.S. X4 foundations let me go, I’ve been racking my head for the second week))

  • Replace tab spaces only inside quotations.

    4
    0 Votes
    4 Posts
    348 Views
    guy038G

    Hello, @uhax-the-grey, @coises and All,

    Your solution, @coises, seems to work only if :

    A single "......" section exists in current line

    Line-ending char(s) end(s) the current line

    @uhax-the-grey, the difficulty to achive that general goal is that the ending char of a section is the SAME char than its beginning char ( the " character ) :-((

    So I propose to split the problem in 3 successive steps :

    First, we change any couple of " chars, of a single section, with two different control chars ( \x02 and \x03 )

    Secondly, we use the generic regex mechanism, described here, to replace any \t character by a space char, in "............" sections only

    Finally, we restore the two original " delimiters for each section

    This method leads to the 3 successive regex S/R below :

    SEARCH (?s)"(.*?)"

    REPLACE \x02\1\x03

    Then :

    SEARCH (?:\x02|(?!\A)\G)(?s:(?!\x03).)*?\K\t

    REPLACE \x20

    Remark : Do not forget to move the caret ( cursor ) at the very beginning of the current file, before running this second S/R !

    Finally :

    SEARCH [\x02\x03]

    REPLACE "

    Whatever the position of the TAB chars and the " deleimiters, thoughout the text contents, this method should always work properly !

    Best Regards,

    guy038

  • Put first word in each line in quotes

    3
    0 Votes
    3 Posts
    244 Views
    UHAX The GreyU

    @Ekopalypse That worked, thank you!

  • Pluggin. How readding crurent document Line per Line

    2
    0 Votes
    2 Posts
    174 Views
    CoisesC

    In what language are you writing your plugin?

    What do you have so far?

    The functions you will need are described here and you will probably need at least some of the functions described here. But from your message, I suspect you are not that far along yet.

    Start here and tell us when/where you get stuck.

    If you read that and your reaction is that it sounds far too complicated, it could be that you want to write a script, not a plugin. If you know Python, check out the Python Script plugin for Notepad++.

  • Incorrect color to property css rotate

    2
    0 Votes
    2 Posts
    197 Views
    Mark OlsonM

    @Yamir-Smith
    You can go to the langs.xml file in your application data directory (which is usually AppData/Roaming/Notepad++ but may also be the same directory where your notepad++.exe file lives), navigate down to Keywords name="instre1" element inside the Language name="css" element, and add the word rotate where it belongs in alphabetical order in the long list of keywords there (for me, it has to be between right and rotation).

    If you’re interested, you can open a PR so that this change can be incorporated into Notepad++ permanently. While you’re at it, you can see if there are other CSS keywords that are missing and add those as well.

  • Ctrl+Alt+S Save As... stopped working

    11
    0 Votes
    11 Posts
    1k Views
    M

    I unfortunately don’t have the permissions to run hotkey-detective on this system.

    I’m just going to settle for using Ctrl+Shift+S for Save As…

    Thanks everyone for help!

  • Interactive debugging scripts using PythonScript plugin

    3
    0 Votes
    3 Posts
    543 Views
    Stefano OrlandoS

    @Mark-Olson I already knew that I could use print and other passive mechanisms like logging. I tried with pdb and the script seems to get on break, an error message missing stdin is displayed on the console but I can’t find a way to enter commands for pdb

  • How to ignore certain characters in searches

    3
    1 Votes
    3 Posts
    850 Views
    Amanda HamiltonA

    @PeterJones ,

    Thank you very much! That does indeed work. I have also heard back from the CLAN developer, who suggests I could use a CLAN program to generate long tiers–but it does make things very hard to read in CLAN. Your solution is probably better. Thank you!!

  • How to run it with Google Web pages

    8
    0 Votes
    8 Posts
    787 Views
    최민정

    @mkupper

    Thanks a lot.

  • 0 Votes
    3 Posts
    238 Views
    Talbot TeboeT

    @Talbot-Teboe
    Sorry I didn’t realize that I needed to include lines without the /001
    In my attempt to create the expression I was not even close. I didn’t even get the last group of the expression correct
    I’d been manually searching for the lines without the /001, and had been at it for 3 hours before contacting the Community.
    Thank you very much for the assistance

  • @admin. how to fix "you need 1 reputation to post links" message

    4
    1 Votes
    4 Posts
    310 Views
    PeterJonesP

    @A-Notepad-User said in @admin. how to fix "you need 1 reputation to post links" message:

    i have same problem.

    No you don’t. You just clicked “quote” to reply, and it posted successfully.

    The issue described above (that the forum wouldn’t let you “quote” a reply if you have 0 reputation, because the @-mention and link-to-previous-post) was fixed when we upgraded forum software a few months ago. It is obviously fixed and working for you, because your post includes both the @-mention and the link-to-previous-post.

    If you have 0 reputation, you are still not able to link to external sites, to prevent spambots and other manual spammers. But other than that, 0 reputation can still post and reply without difficulty.

  • How can i get that grouping

    2
    0 Votes
    2 Posts
    289 Views
    Terry RT

    @Matiasoskari said in How can i get that grouping:

    i wonder how can i get grouping like that?

    It’s called folding. The online manual reference is here.

    It primarily works with “defined” programming languages (lexer file contains the necessary definitions to aid the folding). However you (the user) could also create a UDL. So in order that you can use folding in your file there would need to be a structure to the file contents, such as headings, paragraph start ID’s and the likes.
    Have a read of the process in the online manual’s link and see if it might work for you. The UDL system isn’t as mature as the lexer folding is, and you might encounter an issue creating your UDL. Be aware that others have also found bugs in the UDL system, but in spite of these being raised with the developer none have been fixed (as yet), reference.

    Other posts here with relevance.
    https://community.notepad-plus-plus.org/topic/25543/i-want-to-fold-in-text-files
    https://community.notepad-plus-plus.org/topic/25389/add-folding-rules-to-an-existing-language/3
    Use the text folding in the search window to find other posts which might have some relevance to your post.

    Terry

  • UDL 3 different colors for 3 similar delimiters

    3
    0 Votes
    3 Posts
    356 Views
    J

    @Mark-Olson , you solved it and it works great.

    It did not occur to me that the order would matter.

    Thanks for sharing your cleverness!

  • Problem in CSS alignment in same line . css not working

    Locked
    4
    0 Votes
    4 Posts
    493 Views
    Alan KilbornA

    @Zain-Khan

    The original query was a non Notepad++ related question.
    Please don’t answer those type of questions, it only encourages people to ask any kind of question here, when we want to focus on Notepad++ discussion.

  • Search for inconsistent line endings with a regex? (part 2)

    29
    3 Votes
    29 Posts
    5k Views
    guy038G

    Hello, @ekopalypse, @alan-kilborn and All,

    I did some additional tests, with your modifications, Alan :

    line_of_first_mismatch = editor.lineFromPosition(match.span(0)[0]) notepad.messageBox('Different EOLS detected -- the first inconsistency is on line ' + str(line_of_first_mismatch + 1),'EOL Mismatch', 0)

    and my own one :

    false_EOL = {0:'$\n|\r^', # Find \n AFTER end of line OR \r BEFORE beginning of line as editor.getEOLMode() = 0 ( Windows EOL )

    And everything seems to work as expected !

    So the final version of this script is :

    check = True false_EOL = {0:'$\n|\r^', # Find \n AFTER end of line OR \r BEFORE beginning of line as editor.getEOLMode() = 0 ( Windows EOL ) 1:'\n', # Find \n ( should be \r ) as editor.getEOLMode() = 1 ( Macintosh EOL ) 2:'\r', # Find \r ( should be \n ) as editor.getEOLMode() = 2 ( Unix EOL ) } def check_eol(match): global check check = False line_of_first_mismatch = editor.lineFromPosition(match.span(0)[0]) notepad.messageBox('Different EOLS detected -- the first inconsistency is on line ' + str(line_of_first_mismatch + 1),'EOL Mismatch', 0) user_input = notepad.prompt('Convert ALL line-endings of CURRENT file ( 0 for CRLF, 1 for CR, 2 for LF )', 'INCONSISTENT line-endings DETECTED !', editor.getEOLMode()) if user_input is not None: desired_eol_index = int(user_input) if 0 <= desired_eol_index <= 2: eol_cmd_list = [ MENUCOMMAND.FORMAT_TODOS, MENUCOMMAND.FORMAT_TOMAC, MENUCOMMAND.FORMAT_TOUNIX, ] if desired_eol_index == editor.getEOLMode(): notepad.menuCommand(eol_cmd_list[(desired_eol_index + 1) % 3]) # change to UNDESIRED line-endings notepad.menuCommand(eol_cmd_list[desired_eol_index]) # change to DESIRED line-endings editor.research(false_EOL[editor.getEOLMode()], # regex to search for check_eol, # function to call if regex match 0, # re flags 0, # START of file editor.getLength(), # END of file 1) # count ( at FIRST match ) if check == True: notepad.messageBox('All EOLS correct','EOL check', 0)

    To be rigorous, note that the first EOL inconsistency is always the first line with line-ending chars(s) different from the status bar indication !

    Best Regards,

    guy038

  • Macro Menu commands and the Context Menu

    7
    1 Votes
    7 Posts
    612 Views
    Alan KilbornA

    @Jim-Dailey said in Macro Menu commands and the Context Menu:

    And, as you have pointed out, even if they are on the Macro Menu, the context menu doesn’t “see” them there, but rather on the NPP Exec Menu.

    It’s a bit odd, because when they are configured to be on the Macro menu, they don’t appear on the NppExec plugin menu, so I’m not sure how they’re actually found. Curious.

  • f5 run...go to next line or next character?

    5
    0 Votes
    5 Posts
    450 Views
    ddalthorpD

    @PeterJones Almost certainly true. Thanks. npptoR has not been updated since 2016.