• Is it possible to have a * as an operator and as a comment?

    8
    0 Votes
    8 Posts
    451 Views
    PeterJonesP

    @cll142 ,

    Please note that UDL is not an infinitely-configurable solution; there are times that your desired styling for a language goes beyond what UDL can offer.

    At that point, your choices are to write a full lexer plugin which can be distributed as a DLL or through the Plugins Admin; if that’s beyond your scope, you might get the extra highlighting you want by using the Python Script plugin and the script EnhanceAnyLexer.py that @Ekopalypse shares in his github repo, which allows you to add extra highlighting to a builtin lexer (like the HTML lexer) or to a User Defined Language (UDL) using regexes.

    So if you cannot get the UDL “good enough”, do as much as you can, then try Eko’s script. If that still doesn’t cover your needs, writing a lexer plugin is the next option.

  • What is the difference between 1st, 2nd, 3rd group in keywords list?

    2
    0 Votes
    2 Posts
    216 Views
    PeterJonesP

    @cll142 ,

    The UDL provides multiple keywords lists so that you can style different groups of keywords with different colors, similar to the way that the builtin lexers have multiple lists of keywords (like C has one style for commands like case and if, and a different style for data types like int and double)

    read the docs: https://ivan-radic.github.io/udl-documentation/

  • 0 Votes
    3 Posts
    252 Views
    cll142C

    @PeterJones Thanks for helping me get a better understanding of how the different folding style works and why keywords were being highlighted in non keywords.

  • File tab on menu bar suddenly way too large

    3
    0 Votes
    3 Posts
    277 Views
    Alan KilbornA

    @plasmaster09 said in File tab on menu bar suddenly way too large:

    But all of a sudden, the File tab covers half the screen when clicked on for seemingly no reason, making things quite a bit harder. What do I do?

    Best to do would have been to paste a screenshot of it, so people don’t have to guess at what you’re talking about.

  • Where has the Run in chrome option gone?

    2
    0 Votes
    2 Posts
    133 Views
    Alan KilbornA

    @freeflight-guy

    From version 8.1.3:

    6873e3f2-f906-439f-9980-9379cf0ca8fe-image.png

  • Multi-editing and F3

    3
    0 Votes
    3 Posts
    223 Views
    Paul WormerP

    @Alan-Kilborn Thank you. I’ll give your solution (window in corner) a try.

  • Tail -f freezing notepad++

    3
    0 Votes
    3 Posts
    685 Views
    PeterJonesP

    @Hellhavens ,

    I’ve never tried that intensive an applicatino of the tail-f monitoring feature in Notepad++.

    You might want to play with various options in Settings > Preferences > MISC > File Status Autodetection to see if there’s a combo that makes the tail-f mode work better for you.

  • 0 Votes
    4 Posts
    554 Views
    Chris Tanguay 0C

    @Alan-Kilborn Thank you for this offer. I will very likley take you up on it!
    First, I need to get it installed, then spend some sit-down time familarizing myself with what it is, what it does, what it can do, how it does it, all that cool stuff. I’ll hit you back when I’m there.

  • Insert Date only, x/x/xx format?

    3
    0 Votes
    3 Posts
    486 Views
    Alan KilbornA

    @Chris-Tanguay-0

    Another thing that has been done via PythonScript for years, not sure why Notepad++ sees the need to add that now…

  • Not remembering backup files when opening

    5
    0 Votes
    5 Posts
    3k Views
    Adrian WalkerA

    Thanks to both @Steven-Smith and to @PeterJones as I had exactly the same question.

    I changed my username slightly with the new system and so, although I had copied session.xml, it was silently failing due to the different username in the file paths.

  • Adding New Commands for PowerShell

    5
    0 Votes
    5 Posts
    730 Views
    PeterJonesP

    @unDrac86 said in Adding New Commands for PowerShell:

    I’m looking for a way to edit or add to the lang.xml (or user saved configuration files to dump all of the commands in).

    For some languages, you can just edit the langs.xml. Just follow the config-file editing advice. For the CMDLET style, it’s under the instre2 group of keywords.

    51b389e1-881c-48f0-8816-953e696dd45e-image.png

    … but I’ve never tried adding 1650 words (so probably 8k bytes) to one of the existing keywords groups; so I don’t know whether the langs.xml will process an entry that big. But you can try it.

  • Is there a possible way to REGEX "Trim Leading Space"?

    9
    0 Votes
    9 Posts
    9k Views
    Alan KilbornA

    @Stefan-Pendl

    I guess you missed this from the OP’s first posting:

    So, Notepad++ has the “EDIT —> BLANK OPERATIONS --> TRIM LEADING SPACE” function, which takes care of all those pesky leading spaces & tabbed spaces. But, even as a MACRO, I have to run that function one file at a time, and it’s slower than I’d like.

    I was hoping there might be a way to REGEX this, so I can use the FIND/REPLACE along with the “REPLACE ALL IN ALL OPENED DOCUMENTS”.

  • CTRL+H Help Me Please

    6
    2 Votes
    6 Posts
    254 Views
    ISMAIL ISMAILI

    @Alan-Kilborn @Nuri-UTKU

    Thanks Nuri, I’ll take that into consideration.

  • Entering curly quote marks as UDL operators, or keywords

    4
    0 Votes
    4 Posts
    279 Views
    guy038G

    Hello, @ian-oh, @peterjones, @alan-kilborn and All,

    Sorry for not being very responsive, but I am currently on vacation and consult our forum rather rarely !

    Before presenting the regexes which allow this kind of search, paste the following five lines, in a new tab and let’s study some concepts. Note that line 5 contains a full period

    Start blah “blah blah” “imbalanced open “blah” “imbalanced close” blah” This is a ““Te”st”“““abc”de”fgh. Ijkl”“mnop”” End

    If we’re going to search the longest area, with well balanced delimiters and , we must, first, consider the total range where to search these areas. Let me explain :

    Case A : We may suppose that this range is the file contents ( Default case )

    Case B : We may suppose that this range is limited to current line contents

    Case C : Finally, we may suppose that this range is limited to a single sentence contents, within current line

    If, by convention, any text, without double curly quotes, is considered as well balanced ( zero char and zero char ), we can say that :

    Regarding case A :

    The multi-line area, beginning from word Start, in line 1, till the string “mnop”, in line 5, forms an area with the same number of opening and closing double curly quotes ! ( The last , before End, is not included )

    Then, the final End word, preceded with a space char, is a well-balanced area, by default !

    Regarding case B :

    Line 1 and 2 are well balanced

    Line 3 contains the well balanced area imbalanced open “blah”

    Line 4 contains the well balanced area “imbalanced close” blah

    Line 5 contains the well balanced area This is a ““Te”st”“““abc”de”fgh. Ijkl”“mnop”

    Regarding case C :

    Line 1 to 4 are identical to case B

    Line 5 contains :

    The well balanced area This is a ““Te”st”, in the first sentence

    The well balanced area ““abc”de”fgh, right before the period

    The well balanced area ijkl, preceded with a space char, in the second sentence

    The well balanced area “mnop”

    The well balanced area End, preceded with a space char

    So, if we add +1 for any opening double curly quote and -1 for any closing double curly quote, we get this table, where any char refers to an unmatched double curly quote !

    •--------•---------------------------------------------------• | Line 1 | Start blah | | Count | | •--------•---------------------------------------------------• | Line 2 | “blah blah” | | Count | 1 0 | •--------•---------------------------------------------------• | Line 3 | “imbalanced open “blah” | | Count | • 1 0 | •--------•---------------------------------------------------• | Line 4 | “imbalanced close” blah” | | Count | 1 0 • | •--------•---------------------------------------------------• | Line 5 | This is a ““Te”st”“““abc”de”fgh. Ijkl”“mnop”” End | | Count | 12 1 0•12 1 0 . •1 0• | •--------•---------------------------------------------------•

    Thus, @ian-oh, according to the case A, B or C, you"ll execute the following recursive regexes, in free-spacing mode, beginning at (?x), till the (?1)+ syntax :

    Case A : (?x) (?: ( [^“”] )* ( “ (?: (?1)++ | (?2) )* ” ) )+ (?1)* | (?1)+ Case B : (?x) (?: ( [^“”\r\n] )* ( “ (?: (?1)++ | (?2) )* ” ) )+ (?1)* | (?1)+ Case C : (?x) (?: ( [^“”.!?\r\n] )* ( “ (?: (?1)++ | (?2) )* ” ) )+ (?1)* | (?1)+ ^ ^ | | Groups ---------> 1 2

    Notes :

    These regexes are derived from the end of this article, in the official N++ documentation, which explains how to search for well balanced regions with parentheses :

    (?x) (?: [^()]* ( \( (?: [^()]++ | (?1) )* \) ) )+ [^()]* | [^()]+

    For case C, I considered that a sentence ends at a full period and at an interrogation or exclamation mark. Add other characters to this list if necessary !

    These regexes are mainly composed of non-capturing groups and contain only two groups :

    A non-recursive group 1 which refers to the allowed characters, for each case ( not included the double curly quotes )

    A recursive group 2, as one reference (?2) is located inside the group 2 itself, which adds some intelligence to the overall search by a recursive evaluation of the text

    Note that, in case of incoherent results, it is advised to replace any (?1) syntax by its true value ( [^“”] ), or ( [^“”\r\n] ) or ( [^“”.!?\r\n] ). This may helps !

    Don’t try to perform backward searches : it won’t work !

    Here is an other text of 7 lines, whith a lot of double curly quotes, for additional tests of these 3 recursive regexes :

    ““““ab“““cd““ef”””gh”.ij””klm”””” ““ab““““cd“““ef”””gh””””ijkl”””” ““““““ab“cd“ef“”””gh”ijkl””?”mn””””” ““--ab“cd“ef--gh“ij--kl”mn”o!p““qr--st”uv\wx”--”yz””------”abc abcd--------““efghi----jk”----”lmnop------ ““--ab”cdef--ghi.j--klmn---op““qr--stu”vwx--”yz”---- ---abcde-----““qrs”tu--”vwxyz---

    If you paste these 7 lines in a new tab, you’ll verify that, with the regexA syntax, the last match is all the well-balanced area, below :

    abc abcd--------““efghi----jk”----”lmnop------ ““--ab”cdef--ghi.j--klmn---op““qr--stu”vwx--”yz”---- ---abcde-----““qrs”tu--”vwxyz---

    Which contains, exactly, eight opening characters and eight closing characters !

    Best Regards

    guy038

  • Batch Convert case in multiple open files (maybe regex?)

    11
    0 Votes
    11 Posts
    1k Views
    Chris Tanguay 0C

    @PeterJones That (and as you said, a little patience) worked. The [a-z]+ cuts the time in half.
    Thanks!

  • I cannot download unless I install Driver One. Why is that?

    2
    0 Votes
    2 Posts
    201 Views
    PeterJonesP

    @Jim-Lawrence ,

    I don’t know what Driver One is. It is not a prerequisite for Notepad++.

    If you are having difficulty downloading from the official Notepad++ download site at https://www.notepad-plus-plus.org/downloads/ , then maybe your I.T. department is blocking the site, or otherwise requiring it to go through some “nanny” software (maybe that’s what Driver One is) before running a new application on your PC.

    If you are on company equipment, you will need to talk with your IT department to find out if you’re allowed to install Notepad++, and if so, what the proper procedure is for you.

    If you are on your own computer, then I would recommend scanning for virus/malware if you’re seeing something that says “Driver One must be installed” or equivalent. If you have verified you are not infected with anything, then please share the exact steps you are trying in order to download and install Notepad++ (where you are downloading from, exact link URL, etc), and exactly what errors/popups you see.

  • Built in Language to UDL?

    4
    0 Votes
    4 Posts
    1k Views
    EkopalypseE

    @chris-aldridge

    #define … are handled by the preprocessor list and SV_DispatchThreadID … do get colored once I add it to the type word list

    078fecae-0c1f-43d6-83f3-3fd36c317682-image.png

  • Menus are unreadable in dark mode for me

    15
    0 Votes
    15 Posts
    2k Views
    mere-humanM

    Here is a GitHub issue:
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/10386
    You can see some additional comments there.

  • Installed 8.1.3 Multiple times. Reverts to 7.8.6

    10
    0 Votes
    10 Posts
    2k Views
    Lindsay Cline 0L

    Deleting that directory did the trick; all opens get 8.1.3 now.

    Thanks again!

    Lindsay

  • Edit lnk files

    3
    0 Votes
    3 Posts
    5k Views
    Alan KilbornA

    @James-Rae

    Why can we no longer edit lnk files?

    These files are not text files and Notepad++ is a text file editor.
    A design decision was made to no longer allow editing of the .lnk file itself.

    why would I want to edit the exe file it’s linked to?

    You wouldn’t.
    Presumably, if you were opening a .lnk file in Notepad++, it would point to a text file (which Notepad++ would then open for you).

    the only way I found to edit a lnk file is to change the name of the file the link is connected to, THEN it opens the lnk file to edit (just click no when it asks to delete the shortcut).

    I tried a simple test with this and I found that when I renamed the original file, and then tried opening the .lnk in Notepad++, Windows was smart enough to adjust the link and still find the file, and thus the goal of editing the .lnk file was NOT achieved. :-(

    Deleting the file but keeping the .lnk to it, then works to get the .lnk file itself open in N++, but that’s hardly useful as the original file is gone.

    But…it appears that if you move the original file to the Recycle Bin, then pull the .lnk file into N++, answering “Cancel” to this prompt (a Windows prompt, not a N++ prompt):

    6e1c2905-da34-4fa7-92cf-191877ea7797-image.png

    then the goal of editing the .lnk file can be achieved. Of course, when done editing the .lnk file, get the original file back out of the Recycle Bin.