• Insert new line only if the line has less than X characters

    3
    0 Votes
    3 Posts
    214 Views
    Selin09010938S

    @Alan-Kilborn

    Thank you so much. It worked. I was able to beautify the txt like I wanted after applying your solution with extended expressions.

  • How to exclude some folders from find in files

    4
    0 Votes
    4 Posts
    3k Views
    SinghRajenMS

    I was also looking for this. Thanks @PeterJones !

  • Why is UDL coloring keywords that are in words?

    2
    0 Votes
    2 Posts
    176 Views
    PeterJonesP

    @Leahnn-Rey ,

    Use “Folding in code 2 style (separators needed)” [FiC2] instead of “Folding in code 1 style” [FiC1].

    The FiC2 requires spaces or newlines before and after the open, middle, and close keywords, whereas the FiC1 does not.

    Generally, FiC1 should be used for things like { and } as block-markers to fold on, whereas FiC2 is useful for words.

  • search in C-files and give me the name of the C-function

    6
    0 Votes
    6 Posts
    765 Views
    Klaus KonzeptK

    Hi Vitalii,

    cool things are out there, thanks you for your hints.
    I even didn’t know ctags.

    Klaus

  • java function list is not working in new versoin

    Locked
    2
    0 Votes
    2 Posts
    209 Views
    PeterJonesP

    @Manpreet-Singh ,

    Discussion will continue in another version of your topic

  • FunctionList with UDL

    3
    0 Votes
    3 Posts
    529 Views
    Akil Turner-RichardsA

    @PeterJones Thanks so much! This is exactly what I wanted. Appreciate the swift response.

  • Exclude word from search filter

    2
    0 Votes
    2 Posts
    3k Views
    PeterJonesP

    @kendall-loftin ,

    You can use negative lookbehinds to guarantee that “the text before house is not future and is not tech and is not bass”:

    FIND = (?:(?<!future )(?<!tech )(?<!bass ))house Search Mode = Regular expression

    You can combine that with your whole line matcher, which used to be something like (?-s)^.*house.*$ to become:

    FIND = (?-s)^.*(?:(?<!future )(?<!tech )(?<!bass ))house.*$

    … that will then match the whole line, not just the individual “house” on that line

    ----

    Useful References Please Read Before Posting Template for Search/Replace Questions FAQ: Where to find regular expressions (regex) documentation Notepad++ Online User Manual: Searching/Regex
  • Combining Lines

    3
    0 Votes
    3 Posts
    351 Views
    Alan KilbornA

    @Katherine-Curran

    Find: (?-s)^(.+?):(.+)\R\1:(.+)
    Replace: ${1}:${2}${3}
    Wrap around: ticked
    Search mode: Regular expression
    Press Replace All repeatedly until the status bar of the Replace window indicates 0 replacements made

    Example:

    John Doe: Hello. John Doe: How are you today? John Doe: I hope that you are well. Bob Doe: Hello. Bob Doe: How are you today? Bob Doe: I hope that you are well. John Doe: Hello. John Doe: How are you today? John Doe: I hope that you are well.

    After the first Replace All press:

    John Doe: Hello. How are you today? John Doe: I hope that you are well. Bob Doe: Hello. How are you today? Bob Doe: I hope that you are well. John Doe: Hello. How are you today? John Doe: I hope that you are well.

    Status bar indicates 3 replacements made.

    After the second Replace All press:

    John Doe: Hello. How are you today? I hope that you are well. Bob Doe: Hello. How are you today? I hope that you are well. John Doe: Hello. How are you today? I hope that you are well.

    Status bar indicates 3 replacements made.

    After the third Replace All press:

    John Doe: Hello. How are you today? I hope that you are well. Bob Doe: Hello. How are you today? I hope that you are well. John Doe: Hello. How are you today? I hope that you are well.

    Status bar indicates 0 replacements made. (Data transform was actually complete with the previous press, but that can only be determined via visual inspection).

  • imported 3 UDL for AHK removed 2 still 3 entries

    2
    0 Votes
    2 Posts
    223 Views
    PeterJonesP

    @Peer-Gynt ,

    Did you exit Notepad++ and re-start it after removing the old files?

    If that doesn’t work, go into the User Defined Language dialog, select each of the “AutoHotkey” languages and click Remove. Restart notepad++ and make sure they are all gone. Then re-save the dark-mode-AHK into the userDefineLangs folder, exit Notepad++ and restart. There should only be one now.

    (If you put the XML into the userDefineLangs folder, you do not ever have to use the Import button in the User Defined Language dialog)

  • Where to find plugin files

    4
    0 Votes
    4 Posts
    348 Views
    Alan KilbornA

    @Ekopalypse said in Where to find plugin files:

    See here for the … three json files

    Also note that info is available directly within Notepad++:

    Open Plugins (menu) > Plugins Admin… On the Available tab (or the others), click on any plugin of interest It will give you an idea of where to obtain, here’s an example:

    8bf71639-0a06-439c-b250-70246f76ff5f-image.png

  • stylesheet

    7
    0 Votes
    7 Posts
    641 Views
    PeterJonesP

    @G-H2LLS said in stylesheet:

    thank you for taking the time to answer me, I’m French and I don’t speak English yet

    The standard language of this forum is English. So if you post in your native language, we have to translate your post into our own language, using our browser’s “Translate this page” tool or by pasting the contents of a post into an external translator like translate.google.com or deepl.com. So if you are having trouble understanding our English replies, you can similarly use your browser’s translate function or an external translation site to translate the answer back to French so you can understand it.

    La langue standard de ce forum est l’anglais. Donc, si vous postez dans votre langue maternelle, nous devons traduire votre message dans notre propre langue, en utilisant l’outil “Traduire cette page” de notre navigateur ou en collant le contenu d’un message dans un traducteur externe comme translate.google.com ou deepl.com. Ainsi, si vous avez du mal à comprendre nos réponses en anglais, vous pouvez de la même manière utiliser la fonction de traduction de votre navigateur ou un site de traduction externe pour retraduire la réponse en français afin de la comprendre.

    Traduit avec www.DeepL.com/Translator (version gratuite)

  • 0 Votes
    6 Posts
    3k Views
    PeterJonesP

    @Pro-Audio ,

    So, looking at the two screenshots, I’m not convinced that Notepad++ & UDL & EnhanceAnyLexer Plugin is really going to give you what you want.

    The “rules” that it uses for highlighting seem pretty arbitrary – for example, in the command apt-get install nano, the nano is not highlighted in the command line, nor one line down after package, but a few lines down, the nano after Package is highlighted. And sometimes the word file is cyan and sometimes purple. That indicates to me that MobaXTerm might just be accepting the colors that the linux tools themselves are setting, rather than performing its own highlighting. And there is virtually no way that we would be able to define a UDL+EnhanceAnyLexer combination that would be able to decide, just from the text, what colors each word should be and have it 100% match what you are seeing in MobaXTerm.

    You could do some things, where you give it a list of keywords like cygwin and libgcc1, etc for cyan coloring, and words like nano and file for purple, then use EnhanceAnyLexer to look for sets of text with no spaces that have multiple / or . between “word” characters… but even that won’t get everything right (like the ellipses not being highlighted). So if you’re looking for exact color match, it’s not going to happen.

    As much as I hate recommending a different tool than Notepad++ for the job in this forum, if you a really looking to keep the exact colors for all words for your linux output copied from MobaXTerm, I think you might best be served saving the RTF output, then opening the RTF file with a word processor like WordPad. (There are times when a Word Processor is the right tool for the job. And Notepad++ is not a Word Processor.)

  • Highlighted line endings

    4
    0 Votes
    4 Posts
    298 Views
    Rick UdlockR

    Problem solved. In the View->Show Symbol menu the Show All Characters item was checked. Clearing it fixed it. I have been using Notepad ++ for several years, and I had never changed anything in that menu choice until today. Thanks for the help.

  • need a way to mark where the page breaks are

    2
    2 Votes
    2 Posts
    221 Views
    Alan KilbornA

    If the 64th line of a group happens to fall on a blank line with no content, the Mark operation would not show that – no text to color red.

    To solve this case, perhaps using “bookmarks” will help. Add this condition to the original Mark All operation:

    Bookmark line: ticked

    This would show like this on an affected line:

    6d95e93c-5c1d-4e36-9d28-fda41ba760c6-image.png

  • Number conversion feature or plugin

    13
    1 Votes
    13 Posts
    8k Views
    mylittleplaceholderM

    @Alan-Kilborn I think I’ll duplicate it and make “hex to decimal.py” and “decimal to hex.py” to skip the dialog. Very helpful.

  • Change color of text after the echo in batch

    13
    0 Votes
    13 Posts
    1k Views
    EkopalypseE

    @amymor @Alan-Kilborn

    I suppose that I have found the cause of the problem
    It looks like calling NPPM_GETLANGUAGENAME with a value of -1 can cause npp to crash. I assume this also applies to NPPM_GETLANGUAGEDESC, as I suspect the problem manifests itself when getLangDesc is called.

    Thread 1 received signal SIGSEGV, Segmentation fault. 0x00007ff6413bc493 in notepad++!GetNameSpace () (gdb) bt #0 0x00007ff6413bc493 in notepad++!GetNameSpace () #1 0x00007ff6413d8f2d in notepad++!GetNameSpace () #2 0x00007ff6413dab12 in notepad++!GetNameSpace () #3 0x00007ff6413d4ce1 in notepad++!GetNameSpace () #4 0x00007ffd14c0e858 in USER32!CallWindowProcW () from C:\WINDOWS\System32\user32.dll #5 0x00007ffd14c0e3dc in USER32!DispatchMessageW () from C:\WINDOWS\System32\user32.dll #6 0x00007ffd14c20bc3 in USER32!SendMessageTimeoutW () from C:\WINDOWS\System32\user32.dll #7 0x00007ffd16ed0d74 in ntdll!KiUserCallbackDispatcher () from C:\WINDOWS\SYSTEM32\ntdll.dll #8 0x00007ffd14251124 in win32u!NtUserMessageCall () from C:\WINDOWS\System32\win32u.dll #9 0x00007ffd14c0df02 in USER32!SendMessageW () from C:\WINDOWS\System32\user32.dll #10 0x00007ffd14c0d68a in USER32!SendMessageW () from C:\WINDOWS\System32\user32.dll #11 0x00007ffce3751888 in notepadpp__Npp_call (n=..., msg=2107, wparam=18446744073709551615, lparam=0)

    I add a check in EnhanceAnyLexer to prevent calling it in this case

    pub fn(n Npp) get_language_name(buffer_id usize) string { lang_type := n.call(nppm_getbufferlangtype, buffer_id, isize(0)) if lang_type == -1 { return 'UNKNOWN_ERROR' } mut buffer_size := int(n.call(nppm_getlanguagename, usize(lang_type), isize(0))) + 1 mut buffer := alloc_wide(buffer_size) n.call(nppm_getlanguagename, usize(lang_type), isize(buffer)) lang_name := unsafe { string_from_wide(buffer) } return lang_name.to_lower().replace('udf - ', '') }

    An issue has been opened.

  • comment symbol @ empty lines

    6
    0 Votes
    6 Posts
    746 Views
    qwertz_1234Q

    @PeterJones Thank you!

  • Notepad++ question

    3
    0 Votes
    3 Posts
    252 Views
    Kavita ShettyK

    Thanks Peter, it worked. :)

  • How do you color certain text after a keyword in notepad++?

    31
    0 Votes
    31 Posts
    4k Views
    PeterJonesP

    @Neil-Schipper said in How do you color certain text after a keyword in notepad++?:

    you described here

    Oh, come on, that was more than a day ago. I can’t seriously be expected to remember something from that far back! ;-)

  • Space Folding

    4
    0 Votes
    4 Posts
    384 Views
    Alan KilbornA

    @Matt-pointvicente

    If you “disagree” with that well than so be it.

    I think Peter is willing to take your complaint seriously, as long as you can provide what he asked for, specifically from above:

    If you disagree with my experiments, please show example text…

    As it is, you’ve given nothing but an additional whine.