• Suddenly unable to search within a document!

    6
    0 Votes
    6 Posts
    238 Views
    G

    @mkupper Thank you. Interesting. I never changed those settings, but following your instructions resolved the issue.

  • Find files that don't contain

    7
    0 Votes
    7 Posts
    3k Views
    Alan KilbornA

    Here’s a real feature request for making “Find files that don’t contain” a part of standard Notepad++: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/15680

  • Is there a way to keep a blank "working space" as I'm logging information?

    11
    0 Votes
    11 Posts
    530 Views
    Alan KilbornA

    @guy038 said :

    Here is the list

    Which hopefully bears some similarity to:

    https://www.scintilla.org/ScintillaDoc.html#SCI_SETYCARETPOLICY

    :-)

  • AutoIt opens notepad++ with "Folder as Workspace" open

    11
    0 Votes
    11 Posts
    1k Views
    Alchemist ZimA

    @PeterJones said (I do still highly recommend not running in Admin mode except when you absolutely have to.)
    I’m logged in as ADMIN with UAC turned off
    I know its not best practices, but it works for me

    Thank You for the help

  • Is there a settting for :"high visibility" options?

    4
    0 Votes
    4 Posts
    596 Views
    Alan KilbornA

    @DSperber1 :

    Looks a bit above my pay grade, and all things considered I think I’ll just stick with N++ in its stock form.

    Your choice, but it really isn’t that hard to just use something as opposed to writing it yourself. Someone else already did what’s “hard” about it.

    having some kind of a “ruler” effect in order to guide the eye as it scans on a single line from left to right is a very useful feature

    There can be a lot of coloring going on in a file’s presentation, depending upon the file type. Probably it was thought that an every-other line coloring was too much for the standard product. Certainly for “plain” files where there isn’t any other coloring going on, it makes some sense.

    You can always make a feature request for it; see details HERE on how exactly to do that.

  • Issues with Syntax Highlighting for a Custom Language - Emmanuel Katto

    2
    0 Votes
    2 Posts
    296 Views
    PeterJonesP

    @Emmanuel-Katto ,

    I’ve created a user-defined language (UDL) but it doesn’t seem to highlight keywords and functions correctly

    It does for me. Could you be a bit more specific?

    I’m not sure how to properly categorize keywords, functions, and comments.

    Put your various keywords in the different Keywords fields; if you have different groups of keywords that you want styled differently, put them in different fields, otherwise you can just put all the keywords together.

    For UDL, “Functions” are just a kind of keyword, from the perspective of a UDL (or any of the builtin syntax highlighters). Unless you are talking about the Function List panel in Notepad++, in which case you need to set up the FunctionList definition as described in the User Manual > Config Files > Function List Definitions. Our Function List Basics FAQ is a great starting point for understanding the structure of the Function List definition. However, getting the regex right for classes and functions can be a bit tricky… it’s usually best to start at the simplest, and slowly increase the complexity of the regex with frequent testing. (And Function List definitions are annoying, in that you have to restart Notepad++ with every change you make, no way around it.)

    UDL Comments are a separate concept from keywords, and I am not sure why you are trying to “categorize” comments alongside keywords. You just set up the Comment Line Style and/or Comment Style, and then the comments are styled separately (and, unless you enable the checkmarks in those Styler boxes, there won’t be any keywords or other syntax highlighting inside a comment)

    After making changes to the UDL, I’ve noticed that sometimes they don’t appear to take effect immediately

    They do take effect immediately. Not sure why it seems to you that they don’t.

    Start with:
    c70ea7be-99e4-4340-a3ae-03a09c119e9a-image.png

    …then add Styler settings and word2 to the 2nd group, and it takes effect immediately:
    7a2b8c5b-269c-4636-aaad-34bd84dc8389-image.png

    But because your complaints were rather vague, I can just give overview-style help. “More details” is “more better” when asking for this kind of help.

  • Why does this regexp get greedy when I use replace-all?

    7
    0 Votes
    7 Posts
    369 Views
    guy038G

    Hello, @mkupper, @alan-kilborn, @coises and All,

    So, as a summury, to delete the first standard character, only, of any line, of current file, use one the following search regex S/R :

    SEARCH (?-s)^.(.)?

    SEARCH (?-s)^.(.*)

    SEARCH (?-s)^.(.*\R)

    And use :

    REPLACE \1 or $1

    Now, an other possibility would be to add a character or string, that you are certain is NOT part of current file. Then you’ll run the two consecutive regex S/R, below :

    SEARCH ^

    REPLACE Your characterorstring ( like ¤ or xyzt , for example )

    And :

    SEARCH (?-s)¤.?    or    (?-s)xyzt.?

    REPLACE Leave EMPTY

    You may also join these two regex S/R in a single one :

    SEARCH ¤.?|(^)

    REPLACE ?1¤

    Or :

    SEARCH xyzt.?|(^)

    REPLACE ?1xyzt

    And click TWICE on the Replace All button !

    Best Regards,

    guy038

  • Regex keyword list

    2
    0 Votes
    2 Posts
    174 Views
    PeterJonesP

    @filipe-Medeiros

    No, it does not.

    However, you can use the EnhanceAnyLexer plugin to use a regex to change the foreground color on words for a UDL.

    Assuming you had a udl called MyUDL, then the config section

    [MyUDL] 0x0000FF = \bword\d+\b 0x00FF00 = \bgreen_\w+\b

    that would color word1 or word987 as red, and anything starting with green_ using a green foreground.

    Using that idea, you could define most of your UDL’s keywords in the normal UDL interface, and add EnhanceAnyLexer to do additional keywords using regex

  • Replacing all spaces between a string and the newline character

    6
    0 Votes
    6 Posts
    711 Views
    guy038G

    Hi @kiyn, @alan-kilborn and All,

    Ah… You right about it, Alan. Sorry, I was concentrating on my example !

    So, regarding the general case and to be rigourous, we should use the generic regular expression itself :

    SEARCH (?-si:BSR|(?!\A)\G)(?s-i:(?!ESR).)*?\K(?-si:FR)

    REPLACE RR

    where :

    FR = \x20 ( a space char )

    RR = %20

    BSR = FILE:///

    ESR = The end of any link, beginning with file:/// or FILE:/// : for example, \.mp3 or \.com|\.us or simply \.\w{2,}

    Notes :

    We can replace the (?-si: modifiers, at the beginning of the regex, by the insensitive modifier (?i: only

    We can omit the (?s-i: modifiers, in the middle of the regex, and keep only the non-capturing group (?:(?!ESR).)

    We can omit the (?-si: modifiers and the non-capturing group, all together, at the end of the regex

    So the generic regex can simply be expressed as :

    SEARCH (?i:BSR|(?!\A)\G)(?:(?!ESR).)*?\KFR

    REPLACE RR

    Thus, the functional regex S/R becomes :

    SEARCH (?i:FILE:///|(?!\A)\G)(?:(?!\.\w{2,}).)*?\K\x20

    REPLACE %20

    And from this INPUT text :

    file:///D:\Documentation\Musique\Marilyne\Amy Winehouse - Back To Black.com first Test Second test file:///D:\Documentation\Musique\Marilyne\Jason Marz|I'm Yours.fr FILE:///D:\Documentation\Musique\Marilyne\Norah Jones - Toes.us. Third test Fourth test file:///D:\Documentation\Musique\Marilyne\Scorpions - Still Loving You.gouv fifth and final test file:///D:\Documentation\Musique\Marilyne\Norah Jones - Wake Me Up.MP3

    We get this OUTPUT text :

    file:///D:\Documentation\Musique\Marilyne\Amy%20Winehouse%20-%20Back%20To%20Black.com first Test Second test file:///D:\Documentation\Musique\Marilyne\Jason%20Marz|I'm%20Yours.fr FILE:///D:\Documentation\Musique\Marilyne\Norah%20Jones%20-%20Toes.us. Third test Fourth test file:///D:\Documentation\Musique\Marilyne\Scorpions%20-%20Still%20Loving%20You.gouv fifth and final test file:///D:\Documentation\Musique\Marilyne\Norah%20Jones%20-%20Wake%20Me%20Up.MP3

    BR

    guy038

  • Notepad++ not responding

    5
    0 Votes
    5 Posts
    18k Views
    Ashutosh SharmaA

    @mere-human Worked for me. Thanks

  • How to delete specific lines only with macro

    5
    0 Votes
    5 Posts
    227 Views
    Dominic LeblancD

    Thanks Guy, I really appreciate your help!

  • need to replace the pipe with / and remove the quotes in text

    6
    2 Votes
    6 Posts
    804 Views
    Thomas KnoefelT

    @Aj-Jarrard
    Or you can use MultiReplace Plugin to target specific columns and replace content only in these columns. … and you can even colorize your columns with that Plugin.

    2944b529-869d-4176-b624-e42423c475e4-image.png

  • DoxyIT on 64bit: Access violation

    5
    1 Votes
    5 Posts
    510 Views
    C

    @Clicketyclick Well I caved in and build myself a Python 2 script that does the job - for me at least. It’s available on my Github: clicketyclick.github.io/TipsAndTricks/Notepad++/Doxyit

  • Notes are getting deleted from Notepad++

    3
    0 Votes
    3 Posts
    561 Views
    EkopalypseE

    @Duty-Lead
    What version of Npp are you using?
    Can you post the debug information from the ? menu?

    Whatever i have written in notepad++, it is getting deleted after 4-5 days automatically

    What does that mean?
    The files are still there, but the contents have been removed? That would be very confusing!
    Or have the files disappeared? If so, which files are we talking about? Files that were backed up automatically?
    That is, that you did not save manually?
    I’m guessing you have software like CCleaner running that removes temporary stuff depending on the settings.

  • How do i unhide lines?

    15
    1 Votes
    15 Posts
    5k Views
    mkupperM

    @GrampaWildWilly The FAQ: Feature Request or Bug Report shows the best (and only) way to request and, or, to vote, on feature requests.

    On github I see six open issues when I search for “unhide” Unfortunately, most of the issues seem to be related to conflicts between hiding lines and other Notepad++ features.

    Maybe there’s an issue in there asking for just the ability to unhide a selection. I did not see it.

  • Help with find and replace

    4
    0 Votes
    4 Posts
    383 Views
    CoisesC

    @Terri-Willowkeep said in Help with find and replace:

    I doing something wrong?

    My guess is that you have Search Mode: Regular expression selected when you mean to have one of the other two options. A period in a regular expression matches any single character.

  • How to delete characters after certain number

    3
    0 Votes
    3 Posts
    166 Views
    Cristina MoiseC

    @Alan-Kilborn Can’t say in words how much I love you right now.You made my day !! So happy!Again thank you for your prompt answer.

  • Want to check spaces

    6
    0 Votes
    6 Posts
    1k Views
    Mampi BordoloiM

    @Mark-Olson Exactly what i mean. Thank you so much ❤️ for your help

  • Replace content between string that contains a specific word

    13
    0 Votes
    13 Posts
    1k Views
    Marius MasYM

    @PeterJones it is working good, thank you much

  • NPPExec: is it possible to detect if text is selected or not?

    3
    2 Votes
    3 Posts
    194 Views
    Mark OlsonM

    @pbarney

    If you want to detect if there is exactly one selection of nonzero length, do the following:

    Call SCI_GETSELECTIONS. If the result is greater than 1, there are multiple selections. Call SCI_GETSELECTIONSTART and SCI_GETSELECTIONEND to get the start and end of the selection. If the end is greater than the start, the user has a single nonzero-length selection. As you correctly identified, you can then use SCI_GETSELTEXT to get the selected text, although in this script it doesn’t look like that’s really necessary.

    Based on a recent issue I saw with the JSON-Viewer plugin where incorrectly assuming that the user always had a single selection caused NPP to crash, I think that validating that there is a single selection is generally good practice,