Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All categories
    • Leszek HelakL

      How do I add a macro to toolbar

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      8
      0 Votes
      8 Posts
      189 Views
      Leszek HelakL

      @PeterJones
      Thanks, I understand

    • Game MoviesG

      Cannot select bold character in replace in files

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      8
      0 Votes
      8 Posts
      110 Views
      Alan KilbornA

      @Game-Movies:

      This is indeed what your data looks like:

      <strong>$1</strong>!

      Your search screen capture shows that you are using Regular expression search mode. This isn’t going to allow you to match the $ as that is a special character.

      You’d want:

      <strong>\$1</strong>!

      But if you remove that, wouldn’t you also want to remove the line (now empty) that it is on as well? And what about the <p> and </p> lines that wrap it?

      I get the sense that you are just kind of hacking at this, and are likely to end up with a mess in the end.

    • Hank KH

      This is in regards to using "Find in Files" tab.

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      7
      0 Votes
      7 Posts
      116 Views
      Hank KH

      @PeterJones

      An it was right above auto-detect encoding … lol

      Thx again

    • donhoD

      These were my f**king ChatGPT!

      Watching Ignoring Scheduled Pinned Locked Moved Humour
      7
      5 Votes
      7 Posts
      260 Views
      Lycan ThropeL

      @donho ,
      I’m going to have to take a picture of my ‘library’ before I clean it up. Mine are in a room with closed blinds, covered by other items and are not sun bleached like yours. I have 3 bookcases and a computer desk with shelves that are stacked all over. I have a path to the conputer cockpit. It was my home within my home about 26 years ago, when I used to be bleeding edge. Now it’s a museum of technnology that I need to get back into…but you’re right, those were our ChatGPT’s. :-)

    • donhoD

      Notepad++ v8.8 Release

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      7
      4 Votes
      7 Posts
      4k Views
      N

      @donho said in Notepad++ v8.8 Release:

      @Neymar44
      The bug has been fixed in v8.8.1. Here is v8.8.1 RC:
      https://community.notepad-plus-plus.org/topic/26833/notepad-v8-8-1-release-candidate

      The glitch indeed disappeared in the last 8.8.1 RC, thank you !

    • Alan KilbornA

      Two buffer-activated notifications instead of just one

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      7
      3 Votes
      7 Posts
      296 Views
      Alan KilbornA

      I noticed a workaround; consider the following script:

      # -*- coding: utf-8 -*- from __future__ import print_function # Python2 vestige! # see https://community.notepad-plus-plus.org/topic/26799 "Two buffer-activated notifications instead of just one" from Npp import notepad, NOTIFICATION last_known_doc_index_by_view = [ notepad.getCurrentDocIndex(0), notepad.getCurrentDocIndex(1) ] def find_docindex_from_buffer_id_via_enumeration(test_buffer_id, must_be_in_this_view): for (pathname, buffer_id, index, view) in notepad.getFiles(): if view != must_be_in_this_view: continue # needed to find the right doc in case of cloned doc if buffer_id == test_buffer_id: return index return -1 # never happens def bufferactivated_callback(args): cfn = notepad.getCurrentFilename().rsplit('\\', 1)[-1] # only the filename, no directory print('BUFFERACTIVATED:', cfn, 'args=', args) current_view = notepad.getCurrentView() current_doc_index = notepad.getCurrentDocIndex(current_view) curr_doc_index_via_enumerating = find_docindex_from_buffer_id_via_enumeration(args['bufferID'], current_view) if current_doc_index != curr_doc_index_via_enumerating: print(' NOT A NEEDED ACTIVATION NOTIFICATION!!!!!!') return print(' HANDLING A REAL ACTIVATION NOTIFICATION!') if last_known_doc_index_by_view[current_view] == current_doc_index: print(' note: THIS DOC WAS ALREADY ACTIVE IN THE ITS VIEW -- so was an activation notify really necessary?') else: last_known_doc_index_by_view[current_view] = current_doc_index notepad.callback(bufferactivated_callback, [NOTIFICATION.BUFFERACTIVATED])

      This workaround works because the “index” reported with the bogus notification is also bogus, and the correct index can be found by looking through the entire tab list for the right buffer id.

      A subtle point of the script is that it can also detect when the active tab in the inactive view is activated by the user.

    • dr ramaanandD

      Find <strong> and </strong> tags but skip it between <p class="translate and </p> and skip words like "stronger"/"strongest"

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      7
      0 Votes
      7 Posts
      187 Views
      dr ramaanandD

      @guy038 Thank you very much. @PeterJones I don’t come here to “fight” with anyone - I linked to the explanation of the SKIP/FAIL method by @guy038 just to help future readers to understand it. I am sorry if I have hurt you but that was not my intention. I request others to comment if any of my posts seem offensive and why they seem so (if they deem it so) - I will correct myself.

    • K

      Bold font style change on Linux Mint

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · · linux font style bold
      12
      0 Votes
      12 Posts
      387 Views
      PeterJonesP

      @kapenike said in Bold font style change on Linux Mint:

      @PeterJones yes I agree, I believe the OP is ------. Keep it to reddit

      Either I have misunderstood what you were implying by that term, or I think you seriously misunderstood me somewhere along the way. I was never intending to insult or otherwise denegrate you – and I would never use the term that I think you were trying to obfuscate to refer to anyone.

      As @mathlete2 said, maybe you just forgot that you had different settings on the two; or, as all I was trying to say, you maybe didn’t notice that it was a plain text file on one machine and a syntax-highlighted file on another.

      Or maybe that wasn’t the cause at all: given the symptoms you described, and the resolution that you said works, I cannot, right now, think of anything else that would have matched your description on both sides of the equation, which is why I currently believe that; but if you have evidence to the contrary, then great. If you wanted to help figure out why things were behaving differently on Windows and Wine for you, then provide some more evidence, and we can try to help you figure it out; or if you’ve got a solution that works for you, and you don’t care about the cause, that’s fine – but I was honestly not in any way trying to insult or attack you.

    • All_StarSA

      WebServerNpp (Python Script plugin)

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      8
      2 Votes
      8 Posts
      298 Views
      notdodgeballN

      Nice. It’s progressing fast.

      Now which will come first, https or authentication?

    • Brent RiggsB

      Notepad++ open in new instance because I use multiple desktops

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      10
      0 Votes
      10 Posts
      8k Views
      mkupperM

      @notdodgeball said in Notepad++ open in new instance because I use multiple desktops:

      This disregard of openSession I never fully understood, as to me it should behave much like you just described.

      I regularly use, or perhaps abuse, -openSession. A whie back I created a batch file, nplist.bat, that extracts file paths from a text file and generates a session.xml file. It then runs Notepad++.exe with -openSession. While I could have just run Notepad++.exe and passed the file names directly to it. I created nplist.bat because I wanted something that allowed me to open thousands of files at once. I did not think thousands of files would fit on the command line and was not comfortable with starting Notepad++.exe thousands of times and having those pass the file name on to the running copy of Notepad++.exe.

      Notepad++ must already have some sort of inter-process communication (IPC) that allows a newly loaded copy of Notepad++.exe to tell the main running instance of Notepad+exe to come to the foreground and to open one or more files.

      That means I should be able to create an run-npp.exe that implements the -instance logic I proposed earlier. The easiest way to define and separate instances of Notepad++ would be to use portable copies. I’d put them in

      c:\npp\apple\Notepad++.exe c:\npp\banana\Notepad++.exe c:\npp\strawberry\Notepad++.exe

      This allows each instance of Notepad++ to live in its own world. This assumes that whatever IPC Notepad++ uses is something that allows for multiple copies of the .exe to run at the same time and for an external app to talk to them. If, for example, Notepad++ is using a named pipe with a fixed name then only one copy can own the pipe.

      What want is the ability to tell an already running instance of Notepad++.exe to open a file. For example, I want to open fruit.txt in Notepad++ and want to use the banana instance of Notepad++.exe to view or work with this file.

    • glandonG

      AndroidLogger.v1.4.3.1 added super features welcome your tests!

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      6
      0 Votes
      6 Posts
      243 Views
      Alan KilbornA

      @glandon said:

      i try to get users clear

      This six-word thing is by far the most important thing you could do.

    • donhoD

      Notepad++ v8.8.1 Release

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      6
      2 Votes
      6 Posts
      4k Views
      MarkusBodenseeM

      Ref to Npp website spelling error

    • Jason McGeeJ

      functionList for LaTeX: Trying to use classRange to have a hierarchical chapter > section document outline

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      6
      0 Votes
      6 Posts
      202 Views
      Jason McGeeJ

      Thanks @PeterJones, I really appreciate your time! I spent a chunk of time yesterday too trying to work out the regex if-then-else functionality before I gave up.

      I wouldn’t want to pick up everything that starts with \ because that will pull in a lot of commands that aren’t related to document structure (every command starts with \). For example, here’s my minimum working example with a numbered list in it, and that picks up the \begin{enumerate} and \items:

      \documentclass{scrreprt} \begin{document} \chapter{Chapter 1 with sections} \section{1.1} \subsection{1.1.1} Lorem \subsection{1.1.2} ipsum \section{1.2} \begin{enumerate} \item dolor \item sit \item amet \end{enumerate} \chapter{Chapter 2 with no sections} consectetur adipiscing elit. \chapter{Chapter 3 with unnumbered sections} \section*{Heading with no number} Phasellus mollis posuere ante vel tincidunt. \section*{Second heading with no number} Donec faucibus tellus sapien, vitae fringilla nulla bibendum eget. \appendix \chapter{Appendix A} \include{document} \chapter{Appendix B with sections} \section{B.1} Nam mauris nisl, cursus at erat in, \section{B.2} molestie luctus nulla. \end{document}

      … but picking up the \chapter{} as a function along with the \section{}s is a great workaround!

      Here’s what I have now:

      <?xml version="1.0" encoding="UTF-8" ?> <!-- ==========================================================================\ | To learn how to make your own language parser, please check the following | link: https://npp-user-manual.org/docs/function-list/ \=========================================================================== --> <NotepadPlus> <functionList> <parser displayName="LaTeX Syntax" id ="latex_class" commentExpr="(?x) (%.*?$) # Comment " > <function mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?im-s) # ignore case, ^ and $ match start/end of line, dot doesn't match newline \\begin{document} # match start of document " > </function> <classRange mainExpr ="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?m) # ^ and $ match at line-breaks (?'CLASS_START' ^\s* # optional leading white space before \chapter \\(chapter\*?) ) (?s:.*?) # whatever, (?= # ...up till \s* # ...optional leading white-space of (?: (?&amp;CLASS_START) # ...next header | (\\end{document}) # ...or end of document ) ) " > <className> <nameExpr expr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?<={) # brace before name .*? # name (?=}) # brace after name " /> </className> <function mainExpr="(?xm-s) # free-spacing (see `RegEx - Pattern Modifiers`) \\(chapter| # match chapter so that even \chapters with no \section appear section| # match \section subsection| # match \subsection )\*?{.*} # match starred and unstarred commands " > <functionName> <funcNameExpr expr=".*"/> </functionName> </function> </classRange> </parser> </functionList> </NotepadPlus>

      And the result on the sample file:
      Screenshot 2025-05-14 094212.png

      I modified the classRange mainExpr because I wanted to also match indented \chapter{}s (like I have for the appendices in the new sample file). After that change I found that the last \chapter{} wasn’t being matched with \Z so I changed the alternate search to look for \end{document} instead (which will always appear) and that worked.

      Thanks for your help!

    • DougK.AZD

      Large file - hangs when entering text

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      6
      1 Votes
      6 Posts
      319 Views
      xomxX

      @DougK-AZ said in Large file - hangs when entering text:

      couldn’t find a way to upload the sample file.

      Each line is similar to the following: …

      Can you reproduce the problem also with this testfile_356529lines_LF.zip?

      Can you reproduce with disabled (unchecked) N++ Preferences > Auto-Completion > Enable auto-completion on each input ?

    • Bas de ReuverB

      What makes a custom lexer appear as item in the Prefrences > Indentation list?

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      6
      0 Votes
      6 Posts
      212 Views
      Bas de ReuverB

      Nice, thanks for fixing the issue 👍

    • Claudia SvensonC

      Re-Assign hotkey: Conflict found --> auto-delete previous assigment?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      6
      0 Votes
      6 Posts
      142 Views
      mathlete2M

      @PeterJones said in Re-Assign hotkey: Conflict found --> auto-delete previous assigment?:

      Once you know for sure which one you want to not use that shortcut, you just have to click on it and choose Clear

      Unless it’s a Scintilla command; as discussed in this thread, those are much more cumbersome to clear.

    • F

      Find 'Not Found' Matches in list

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · · not found
      6
      0 Votes
      6 Posts
      181 Views
      guy038G

      Hi, @fern99, @terry-r, @mkupper and All,

      An other example :

      To list all files which do NOT contain the strings ABC AND JKL AND XYZ, in upper case, from your opened documents, use :

      FIND (?s-i)(?=\A.*(?:ABC|JKL|XYZ))(*SKIP)(*F)|\A.

      Check the Wrap around option

      Click on the Find All in All Opened Documents button

      REMARK : Do keep the LAST regex dot ( . ), after \A. If omitted, consecutive searches of this regex does *NOT give the same results ! ( Bug ? )

      BR

      guy038

    • byzodB

      Break a string by delete paired quote will unfold folded codes in some language highlight

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      6
      0 Votes
      6 Posts
      121 Views
      mpheathM

      @byzod

      This issue mentions about the unfolding that can happen with numerous lexers.

      https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12121

      I posted a LuaScript script in a comment in that thread that trades the behavior for another behavior by changing the editor.AutomaticFold setting temporarily in the 2nd script. Certain characters will set the automatic folding off which changes the header fold lines to become invisible sections and back again once continue editing. It is not a solution but rather a swap of side-effects to help to keep the current fold state.

      I have little knowledge of AutoHotkey syntax and it’s UDL issues so at the moment cannot offer an updated LuaScript script for calling editor.AutomaticFold.

      The objective-c lexer seems unaffected with /* multi-line comments and not sure why yet compared to looking at the lexers source code. Obviously the styling continues on past the folding though why it does not open the folds seems like possibly the folding is delayed in some lexers and so like the LuaScript script does is to cause a delay though that is just a theory at the moment.

    • VTGroupGitHubV

      One toolbar button won't stay at new location

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      5
      0 Votes
      5 Posts
      43 Views
      VTGroupGitHubV

      No it’s not. The problem is back. Something made it work for one restart, then it broke again. I’m still looking for a fix/workaround.

    • deleeleeD

      Insert sequential numbers at start of lines

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      31
      0 Votes
      31 Posts
      7k Views
      Alan KilbornA

      @deleelee

      the script I quoted which was TextFxInsertLineNumbers2.py

      Hmm, you’re right, I guess I ignored the script you quoted, and just looked in this thread for the first script presented. Sorry.

      Anyway, that script has a similar line:

      editor.replaceLine(line_nbr, '{n:08} {c}'.format(n=running_line_nbr, c=line_content))

      and I’d think it wouldn’t be that hard to adapt that line from what I gave before, into:

      editor.replaceLine(line_nbr, '{n}) {c}'.format(n=chr(96+running_line_nbr), c=line_content))