• Please Read This Before Posting

    Pinned Locked
    1
    7 Votes
    1 Posts
    5k Views
    No one has replied
  • v8.7 Search Results Missing

    Pinned
    14
    0 Votes
    14 Posts
    885 Views
    xomxX

    This v8.6.9-v8.7.2 issue has been fixed (GitHub commit).
    The fix will be included in the next Notepad++ version (probably v8.7.3).

    @PeterJones
    I would leave this topic pinned for a while longer until the fix reaches most N++ users.

  • HELP: Having trouble with Macros in v8.5.3 or later

    Pinned
    28
    2 Votes
    28 Posts
    5k Views
    Mike NewmanM

    Moderator Note: The contents of this post were moved to a separate topic, Macro works normally, but fails when shortcut is Ctrl+Shift+C, because it’s actually separate from the >=v8.5.3 issue for this Topic.

  • Delete all lines that NOT contains a specific phrase

    4
    0 Votes
    4 Posts
    42 Views
    Rockberto ManentiR

    @Coises and @Terry-R

    thanx so much. Both methods work perfectly.

  • 0 Votes
    7 Posts
    134 Views
    mkupperM

    @Fermi said in Efficiently select/copy bookmarked lines and their collapsed contents altogether?:

    In a generic form (.ini), I want to select the header and its contents, where the header/comment before/after the keyword (ie. positive) are unique.

    Ideally, regular expressions are constructed to match only the data you want it to match and will not match anything else. You don’t want false positives nor false negatives.

    As you seem unwilling or unable to provide examples of the data you are attempting to match any help we provide here will also need to be generic or vague. To complicate things, you also seem to be shifting the goalposts of what a section header looks like.

    I decided to define a section header as a line that starts with a [ and that anything else is not a section header line. With that in mind, here is a rather general regular expression that will match the positive sections:

    (?-i)^\[.*[,;] *positive,.*\R(?:(?!\[).*\R)*

    That expression has two main parts

    (?-i)^\[.*[,;] *positive,.*\R matches the section header lines we are interested in. (?:(?!\[).*\R)* matches zero or more lines that are not section header lines.

    Reading the (?-i)^\[.*[,;] *positive,.*\R part from left to right we have:

    (?-i) Turns off the ignore-case option so that we only match a lower case positive. If your data includes things such as Positive or POSITIVE then you should use (?i) instead of (?-i). ^ matches the start of a line, \[ matches a [. We need the \ as [s have a special meaning within regular expressions. Using \[ says to look for a normal [. .* matches zero to any number of characters. [,;] matches either a comma or semicolon. When you first posted you had commas and now you have semicolons. That’s fine, we can handle either or both and so I went with both. * matches zero to any number of spaces between the [,;] and the positive. positive, matches the word positive followed by a comma. .* matches zero to any number of characters. This will run to the end of the line. \R matches the end of line characters themselves.

    The second part with (?:(?!\[).*\R)* is slightly convoluted as I also want to match empty or blank lines and to include those in the section.

    The (?: and )* outer parentheses and their decoration says to repeat the stuff that’s inside zero or more times. (?!\[).*\R is the inner part and it matches any line that does not start with a [.
  • automatic romanization in cyrillic cue files

    4
    0 Votes
    4 Posts
    58 Views
    Rockberto ManentiR

    @Mark-Olson
    thanks for reply. you are absolutely right, in fact a friend who programs in python has prepared a script that works perfectly for this need

    @PeterJones
    thanks also to you. I will try also this regex. Thanks for help

  • Whitespace background cannot be changed

    5
    0 Votes
    5 Posts
    72 Views
    PeterJonesP

    @HalfOffHell ,

    Your screenshot is of a “normal text file”. But it appears to actually have PythonScript, at least on the non-red-boxed line.

    So if you are coding in some language, many of the language lexers have a DEFAULT color – including Python – which is used for the spaces. So it might be than changing Language: Python > Style: DEFAULT > Background colour is sufficient for you.

    For example:
    433c1575-a1d1-4852-9fba-c5e9e4aff5e7-image.png

    Caveat: Not all languages have or use a DEFAULT style for whitespace – and some that have the DEFAULT also use it for real text that doesn’t match any of their other Styles while lexing, not just whitespace, so changing the background of a language’s DEFAULT style might not work like you want for all languages … But for what I remember of Python, it doesn’t use the DEFAULT style for anything but whitespace, so it may meet at least some of your desires.

  • Selection Offset

    3
    0 Votes
    3 Posts
    30 Views
    0

    @PeterJones
    Thankyou. Both Scale and Resolution are different.

  • ComparePlugin crashed and lost all files

    19
    0 Votes
    19 Posts
    203 Views
    xomxX

    @Kiran-Chatha

    0x40000015 means STATUS_FATAL_APP_EXIT, usually it means that something caused an unhandled runtime exception in app and a terminating signal (SIGABRT/SIGTERM/SIGINT) has been raised (e.g. by the Microsoft C-Runtime abort() func). Faulting module name: ComparePlugin.dll means for us a confirmation that the problem is most likely in the plugin and not in the N++ app
  • changing font not working in v8.6 (but changing size and color does work)

    25
    1 Votes
    25 Posts
    5k Views
    xomxX

    @Andi-Kiissel said in changing font not working in v8.6 (but changing size and color does work):

    In N++ UI this can not be changed,

    In the upcoming N++ version (probably v8.7.8) these Scintilla rendering modes will be accessible via the standard N++ Preferences > MISC.: GitHub commit.

    @Tobias-Lind said in changing font not working in v8.6 (but changing size and color does work):

    When DirectWrite is enabled, I can only use the base version of the font. Any other variant will default to some fallback font.

    The whole problem with the N++ DirectWrite mode & fonts is in the fact that the DirectWrite uses WSS (Weight-Stretch-Style) font family model whereas the older GDI RBIZ (Regular-Bold-Italic…) one. Notepad++ originally supported the older GDI font handling only, then it makes the newer DirectWrite mode accessible but did not accommodate the existing N++ GDI font handling code to match the WSS model of the DirectWrite font families.

    There was a nice patch for the Scintilla library, which solves exactly that but unfortunately it has not been accepted. So someone has to fix that directly in the N++ codebase. There is the MS DirectWrite interface IDWriteGdiInterop helper intended exactly for that job, so maybe a challenge for someone capable with free time…?

  • 2 Votes
    3 Posts
    57 Views
    CoisesC

    @HalfOffHell said in notepad not responding due to searching the regular expression "(?-i)\u*(?=[^\l])" in a file that has "└" as the last character:

    put “└” at the end of a file
    Ctrl+F
    paste “(?-i)\u*(?=[^\l])” into da box
    click “Find All in Current Document”
    notepad not responding

    I’ve filed an issue for this.

  • Windows content is blank on remote notepad++ sessions

    16
    0 Votes
    16 Posts
    2k Views
    A

    I made an account just to mention this might be an issue with the display driver for windows 11. While the solution of changing the rendering technology works, I have had issues with other programs not rendering correctly due to Windows 11 not knowing what to do when the lid of the laptop is closed with remoting in.

    The solution I am using for my job on remote machines is to add a virtual display adapter. Method 3 uses a display driver which once installed renders windows previously having issues. This is the method I have been using with much success. Here is the link to the explanations and files:

    https://itproexpert.com/windows-server-vm-screen-resolution-fix/

  • Button to toggle Tabs/Spaces?

    12
    0 Votes
    12 Posts
    697 Views
    PeterJonesP

    @Torax-Malu ,

    @Alan-Kilborn messaged me a link to this post, where he shared a script for the PythonScript plugin, which can be used to set the current file to either tabs or spaces

    Useful link: FAQ: How to install and runscripts with PythonScript plugin – also includes instructions for assigning a keyboard shortcut. And you can even use the Plugins > PythonScript > Configuration… to add a script to the toolbar, allowing you to have a toolbar button to activate it.

  • ctrl+alt+5 ALWAYS opens Notepad++ in Windows for me

    4
    0 Votes
    4 Posts
    61 Views
    PeterJonesP

    @mkupper said in ctrl+alt+5 ALWAYS opens Notepad++ in Windows for me:

    on the desktop and possibly elsewhere

    see if there is a shortcut for Notepad++ on your desktop

    a second location that Windows checks is a shortcut pinned to your task bar

    Also, if @ddalthorp has AutoHotKey or similar “hotkey utility”, there might be a “launch Notepad++” action for the keycombo defined in that utility, as well.

  • File ignoring tab settings

    3
    0 Votes
    3 Posts
    50 Views
    W

    @PeterJones Thanks - I had completely forgotten that I had that plugin installed, and somehow also missed it when posting the question. Disabling the plugin resolved the issue.

  • Style Configurator

    10
    0 Votes
    10 Posts
    214 Views
    PeterJonesP

    @Zainab ,

    I just learned something new today. If I don’t have a stylers.xml, and I hadn’t previously selected an existing theme, and the install directory (the one containing notepad++.exe) doesn’t include stylers.model.xml, then Notepad++ prompts with a dialog that tells me loading stylers.xml failed, like:
    3059d3f3-9683-4954-886c-a297fb5e2c86-image.png

    …if I OK from that point, Notepad++ loads, but if I try to launch Style Configurator, nothing happens. This seems similar to your circumstance.

    (yes, the way i accidentally reproduced your problem was by launching a copy I had built without having the right XML support files while running in doLocalConf mode)

    It gives me that same error if I had Dark Mode chosen, so it was using the DarkModeDefault theme selected, but still had no stylers.xml or stylers.model.xml existing, but then deleted DarkModeDefault.xml and restarted Notepad++.

    Given that you seem to have the Dark Mode in your screenshots, but the new 1 looks more like normal light mode, which matches what I saw in my Dark Mode experiment, I am now hypothesizing:

    You had selected Dark Mode, and one of the dark themes (possibly DarkModeDefault, or any of the other dark themes) Your copy of stylers.xml was deleted (or you changed to an alternate config setup, like cloud or --settingsDir or doLocalConf), and your copy of stylers.model.xml is not in the same directory as notepad++.exe You ran Notepad++, and saw that dialog, but closed it and neglected to tell us

    If you can re-populate stylers.model.xml (grab the official zip download, and copy the stylers.model.xml from that and put it in the same directory as the notepad++.exe that you are running), then re-start Notepad++, then it should not give that error, it should create stylers.xml from stylers.model.xml, and the Style Configurator should be able to launch again. (And if you want, you can also copy the themes from the zip to your <install dir>\themes folder to give you access to the other themes as well)

    Sharing your debug info (?-menu, Debug Info, Copy debug info into clipboard and paste into your reply) could confirm for us if you have a non-standard installation or portable Notepad++, which will help us be more specific about where to look for files and where to put them

    update: also, I noticed that you have logged in since our replies, but didn’t respond to any of our requests for more information. We won’t be able to help you any farther if you choose not to respond so that we can try to help you more. The ball is in your court at this point.

  • bookmark line

    2
    0 Votes
    2 Posts
    39 Views
    Alan KilbornA

    @miki-simone

    Sure. Use Regular expression search mode and separate search terms with |, e.g. apple|banana|orange|grape. Use the Mark tab and checkmark the Bookmark line option.

  • move lines containing specific words to a specific position

    5
    0 Votes
    5 Posts
    55 Views
    Rockberto ManentiR

    @Alan-Kilborn

    thanx again. I solved with a macro! Thanks again for the idea and initial regex!

  • Maintain Indent While Pasting Multiple Lines

    26
    1 Votes
    26 Posts
    3k Views
    Dennis BareisD

    @Alan-Kilborn

    Its been a while but I finally got some time to look and this again.

    Now that I saw the comment in the code pointing to PythonScript and setting up a HotKey it ended up being quite easy.

    Your script seems to do the right thing for what I need and if it doesn’t I’ll learn enough Python to update it and update this post.

  • An issue with background color

    2
    0 Votes
    2 Posts
    68 Views
    PeterJonesP

    @sdfh6srtytydgf-65cghj67ed56u8 ,

    Settings > Style Configurator > Language: Global Style > Style: Default > Background sets the default bg color used by any style that doesn’t override the bg.