• Please Read This Before Posting

    Pinned Locked faq newbie
    1
    7 Votes
    1 Posts
    9k Views
    No one has replied
  • HELP: Having trouble with Macros in v8.5.3 or later

    Pinned
    28
    2 Votes
    28 Posts
    32k 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.
  • Updated NP++ and now lost my previous notes

    2
    0 Votes
    2 Posts
    22 Views
    PeterJonesP
    So I just updated yesterday & now my notes aren’t the most recent ones & I’ve lost a lot of data. Bummer. To fully understand the rest of my reply, I highly recommend reading and understanding our Backup FAQ. If your last run before the update was as Admin, it might not have saved your session file and/or backups in the expected manner, because of permission conflict. With modern Notepad++, you can edit protected files, and it will just ask Windows to ask you for UAC permission when you try to save, so you never have to run Notepad++ as admin for infrequent protected-file edits. (If you are frequently editing protected files, the frequent UAC might get annoying… but that would be the only situation under which I would ever even think about running Notepad++ as Admin in the modern era.) I am positive I had auto save checked off & I had them saved to a specific folder (not the default). There is no “auto save” option native to Notepad++. You’ll have to be more specific about the actual preference name, to give us a better understanding of how your Notepad++ is configured. (My original guess was that you meant you had “session snapshot and periodic backup” off, but see below…) If that wasn’t working, where can I find the previous saved notes? Your saved files are exactly where you saved them. If you don’t know where that is, no one here can search your computer for you. As described in the FAQ, if you have “enable session snapshot and periodic backup” turned on , then the copies of files that have unsaved changes would be saved in %AppData%\Notepad++\backup. If your session file was corrupted, maybe you’ll be lucky and your unsaved-file-snapshots will still be in that backup directory. Actually, you might want to try your %AppData%\Notepad++\session.xml.inCaseOfCorruption.bak file: Exit Notepad++ Windows Explorer, go to %AppData%\Notepad++ Rename session.xml to session.xml--keep Copy session.xml.inCaseOfCorruption.bak to session.xml Run Notepad++ → If it’s now showing the right copy of your files, great! If not, exit Notepad++, delete session.xml, and rename session.xml--keep back to session.xml If the session experiment didn’t work, then look in the %AppData%\Notepad++\backup folder, and open those files directly in Notepad++. If any of them are the most recent versions of your files, great, save them to the right location under the right name, and look into version control and/or external backup so you don’t lose important data again. (update: I added that procedure as a third section in the backup FAQ for easy reference going forward) Admin mode: ON Running with Admin mode will sometimes mess up saved preferences, etc. No one’s found a cause, but my theory is the different ways that Windows OS treats %AppData% (where the config files are stored) when you’re the normal user vs the admin user. Periodic Backup: ON This contradicts my guess as to what you meant when you said “auto save checked off”. My answers above do explain things to check, assuming that you had Periodic Backup turned on before your update, too.
  • Editing lines from vertical to horizontal format

    3
    0 Votes
    3 Posts
    70 Views
    G
    @PeterJones ok man Thank you, the method worked.
  • Alt key interferes with work

    13
    0 Votes
    13 Posts
    3k Views
    P
    I found a plugin that solves this problem. https://github.com/numbereleven-a/NotepadPP_AltShiftMenuFix
  • How to change colors of highlights?

    4
    0 Votes
    4 Posts
    2k Views
    M
    @PeterJones said: @Kiichiro-Matsushita, welcome to the Notepad++ Community. You said: I tried tinkering with the Style Configurator, to no avail… You don’t tell us which theme you are starting with. You don’t tell us what you tried in the Style Configurator. One would think if you really wanted help, you would give us more to work with. That said, I will give the following advice: How do I change those? Using Style Configurator, after you’ve set your theme, you can choose the Global Styles in the first column, and choose the Current Line Background settings (second column) to change the “you are on this line” highlight; for “you have selected this text”, you need to edit the Selected Text Color (again, second column). Please note for these two settings, Style Configurator only pays attention to Background Color – the foreground color and bold/italic/underline settings are ignored. … Good luck. I had the same issue, this answer worked! Appreciate your time & input
  • Problem running a macro without any associated key combination

    11
    0 Votes
    11 Posts
    788 Views
    PeterJonesP
    I already made my debug info available in my first post in this topic, which clearly indicated that I’m using an installed x86 version of NPP. I am sorry I didn’t remember that from a week ago. And “multiple instances” can have different meanings to different people. Even if I had remembered you were using installed, that doesn’t mean that you weren’t also using a portable: not everyone would think to mention such a thing – they might not even think about it, when using their multiple installations/portables next to each other. (I have my daily as Installed, but I also have multiple active portables that use different configurations). I just needed to make sure, because different setups could have vastly different reasons for the symptoms you describe. I normally run NPP the first time after a restart via either its shortcut in my taskbar or the start menu. Any second instance is normally opened with command line options -multiInst -nosession (via AutoHotkey keyboard shortcut), and I always exit it before exiting the primary instance. In theory then, the validate from the main instance should get saved. After you validated, did you exit before running again and spawning multiple instances? Because Notepad++ doesn’t save the new copy of the config file (with the new validation HMAC code) until it exits. So if you ran the main, ran validate, then spawned new instances, the HMAC code might not have propagated to the new instances I don’t know whether N++ gives a copy of the current config structure from memory to the new process, or whether the new process is completely separate, in which case, it would have read the old version from the disk again – re-reading, since you are doing notepad++.exe -multiInst -nosession via AHK (ie, outside N++, instead of using the “Clone to New Instance” command from inside Notepad++), it would have no way of propagating that HMAC to the new instance, because it hasn’t written it to the config.xml yet, so when the new instance reads config.xml, it is out-of-date. A few hours ago, just before I posted my last reply, I was consistently able to replicate NPP’s demand that I re-validate when trying to run my macro. Now, I can’t. No idea why. I am wondering if you finally had a sequence where you did the validate, then exited so it saved the right HMAC, and now everything is settled. I hope so (and believe so). Stay tuned. If it comes back, I’ll be sure to make a note of the exact sequence and post again. Based on my experiments (below), which are 100% repeatable for me, now that the HMAC has been properly saved, it shouldn’t prompt you again until you manually edit the shortcuts file. My Steps to Confirm: create example.pyfrom Npp import notepad notepad.runMenuCommand("Macro", "Trim Trailing Space and Save") exit all Notepad++ use notepad.exe to edit config.xml and remove the line with name=“shortcutsXmlHMAC” (which causes it to be not-yet-validated), and save launch main copy of Notepad++ Run > validate shortcuts.xml open a new instance of N++ with -multiInst -nosession Plugins > PythonScript > scripts > example → it will pop up the shortcuts.xml file and the validation warning messagebox please note: this doesn’t require you to use the keyboard shortcut; just that you run a scrpt that tries to run a macro or run-menu command, as far as I can tell – my experiments have not been using an assigned keystroke to run the script. exit the second instance exit the first instance (which should save the config.xml with validated HMAC) launch main copy of Notepad++ open a new instance of N++ with -multiInst -nosession Plugins > PythonScript > scripts > example → it will not pop up the shortcuts.xml file or the validation warning messagebox, because it’s valid So, I guess the clarified version: if you are using multiple instances, close all intstances but one, look at shortcuts.xml to make sure all the macros and run-menu commands are as you expect them to be, then Run > validate shortcuts.xml, then exit Notepad++ to get it to save that. From now on, you shouldn’t need to validate again unless you intentionally manually edit shortcuts.xml. (Using Shortcut Mapper or saving new macros or run menu commands should not trigger a re-validate, because Notepad++ should update the HMAC when it changes the shortcuts.xml itself) update: PR 889 is adding a NOTE to that effect in the shortcuts.xml security section – you may have to refresh your browser to see it.
  • 0 Votes
    9 Posts
    1k Views
    dr ramaanandD
    @guy038 has given a good example here also: https://community.notepad-plus-plus.org/topic/27611/is-there-a-way-to-find-both-alphabets-with-and-without-accents-at-the-same-time-when-searching
  • 0 Votes
    9 Posts
    686 Views
    guy038G
    Hello, @troglo37, @coises, @peterjones, @dr-ramaanand and All, Préamble : @troglo37, on demand of @dr-ramaanand, I changed your initial title : Is There A Way To Ignore Letters With Accents When Searching? by this new title, which seems more acurrate : Is there a way to find both alphabets, with and without accents, at the same time, when searching? Thank you, @dr-ramaanand, for reminding me of this interesting post, which uses a more general, but more accurate, definition of accented characters ! Indeed, an accented character , let’s say the é character, may be described as : The character é LATIN SMALL LETTER E WITH ACUTE, of Unicode value 00E9 The character e LATIN SMALL LETTER E, of Unicode value 0065, followed with the character  ́   COMBINING ACUTE ACCENT, of Unicode value 0301 Note that, in this second form, the letter e is the main character of an \X sequence and the accent(s), coming next, are the subsequent chars of this \X sequence ! So, the macro, described in my previous post, should be changed as : <Macro name="Global Search" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="3" message="1700" wParam="0" lParam="0" sParam="" /> <Action type="3" message="1601" wParam="0" lParam="0" sParam="(?=\X)(.)|(?!\X)." /> <Action type="3" message="1625" wParam="0" lParam="2" sParam="" /> <Action type="3" message="1602" wParam="0" lParam="0" sParam="(?1\(\?=[[=$1=]]\)\\X)" /> <Action type="3" message="1702" wParam="0" lParam="640" sParam="" /> <Action type="3" message="1701" wParam="0" lParam="1609" sParam="" /> </Macro> And it means that : If the current character found is a single character OR the main character of a current \X sequence, it must be replaced with the string (?=[[=$1=]])\X, where $1 represents the current char If the current character found is an subsequent character of the current \X sequence, thus an accent, it must just be deleted as its main character has been previously taken in account So, let’s consider the following French text, pasted in a new tab : C'est là, près de la forêt, dans un gîte, où régnait un grand capharnaüm, que l'aïeul ôta sa flûte et son bâton de son canoë C'est là, près de la forêt, dans un gîte, où régnait un grand capharnaüm, que l'aïeul ôta sa flûte et son bâton de son canoë Note that, within the first line, the accented characters are single chars whereas, within the second line, the accentued chars are unaccented vowels followed with an accent character If we apply our modified Global Search macro against a copy of the first line of this new tab, we get this regex : (?=[[=C=]])\X(?=[[='=]])\X(?=[[=e=]])\X(?=[[=s=]])\X(?=[[=t=]])\X(?=[[= =]])\X(?=[[=l=]])\X(?=[[=à=]])\X(?=[[=,=]])\X(?=[[= =]])\X(?=[[=p=]])\X(?=[[=r=]])\X(?=[[=è=]])\X(?=[[=s=]])\X(?=[[= =]])\X(?=[[=d=]])\X(?=[[=e=]])\X(?=[[= =]])\X(?=[[=l=]])\X(?=[[=a=]])\X(?=[[= =]])\X(?=[[=f=]])\X(?=[[=o=]])\X(?=[[=r=]])\X(?=[[=ê=]])\X(?=[[=t=]])\X(?=[[=,=]])\X(?=[[= =]])\X(?=[[=d=]])\X(?=[[=a=]])\X(?=[[=n=]])\X(?=[[=s=]])\X(?=[[= =]])\X(?=[[=u=]])\X(?=[[=n=]])\X(?=[[= =]])\X(?=[[=g=]])\X(?=[[=î=]])\X(?=[[=t=]])\X(?=[[=e=]])\X(?=[[=,=]])\X(?=[[= =]])\X(?=[[=o=]])\X(?=[[=ù=]])\X(?=[[= =]])\X(?=[[=r=]])\X(?=[[=é=]])\X(?=[[=g=]])\X(?=[[=n=]])\X(?=[[=a=]])\X(?=[[=i=]])\X(?=[[=t=]])\X(?=[[= =]])\X(?=[[=u=]])\X(?=[[=n=]])\X(?=[[= =]])\X(?=[[=g=]])\X(?=[[=r=]])\X(?=[[=a=]])\X(?=[[=n=]])\X(?=[[=d=]])\X(?=[[= =]])\X(?=[[=c=]])\X(?=[[=a=]])\X(?=[[=p=]])\X(?=[[=h=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=n=]])\X(?=[[=a=]])\X(?=[[=ü=]])\X(?=[[=m=]])\X(?=[[=,=]])\X(?=[[= =]])\X(?=[[=q=]])\X(?=[[=u=]])\X(?=[[=e=]])\X(?=[[= =]])\X(?=[[=l=]])\X(?=[[='=]])\X(?=[[=a=]])\X(?=[[=ï=]])\X(?=[[=e=]])\X(?=[[=u=]])\X(?=[[=l=]])\X(?=[[= =]])\X(?=[[=ô=]])\X(?=[[=t=]])\X(?=[[=a=]])\X(?=[[= =]])\X(?=[[=s=]])\X(?=[[=a=]])\X(?=[[= =]])\X(?=[[=f=]])\X(?=[[=l=]])\X(?=[[=û=]])\X(?=[[=t=]])\X(?=[[=e=]])\X(?=[[= =]])\X(?=[[=e=]])\X(?=[[=t=]])\X(?=[[= =]])\X(?=[[=s=]])\X(?=[[=o=]])\X(?=[[=n=]])\X(?=[[= =]])\X(?=[[=b=]])\X(?=[[=â=]])\X(?=[[=t=]])\X(?=[[=o=]])\X(?=[[=n=]])\X(?=[[= =]])\X(?=[[=d=]])\X(?=[[=e=]])\X(?=[[= =]])\X(?=[[=s=]])\X(?=[[=o=]])\X(?=[[=n=]])\X(?=[[= =]])\X(?=[[=c=]])\X(?=[[=a=]])\X(?=[[=n=]])\X(?=[[=o=]])\X(?=[[=ë=]])\X Which does match the two lines of the new tab ! And if we apply our Global Search macro against a copy of the second line of this new tab, we get this regex : (?=[[=C=]])\X(?=[[='=]])\X(?=[[=e=]])\X(?=[[=s=]])\X(?=[[=t=]])\X(?=[[= =]])\X(?=[[=l=]])\X(?=[[=a=]])\X(?=[[=,=]])\X(?=[[= =]])\X(?=[[=p=]])\X(?=[[=r=]])\X(?=[[=e=]])\X(?=[[=s=]])\X(?=[[= =]])\X(?=[[=d=]])\X(?=[[=e=]])\X(?=[[= =]])\X(?=[[=l=]])\X(?=[[=a=]])\X(?=[[= =]])\X(?=[[=f=]])\X(?=[[=o=]])\X(?=[[=r=]])\X(?=[[=e=]])\X(?=[[=t=]])\X(?=[[=,=]])\X(?=[[= =]])\X(?=[[=d=]])\X(?=[[=a=]])\X(?=[[=n=]])\X(?=[[=s=]])\X(?=[[= =]])\X(?=[[=u=]])\X(?=[[=n=]])\X(?=[[= =]])\X(?=[[=g=]])\X(?=[[=i=]])\X(?=[[=t=]])\X(?=[[=e=]])\X(?=[[=,=]])\X(?=[[= =]])\X(?=[[=o=]])\X(?=[[=ù=]])\X(?=[[= =]])\X(?=[[=r=]])\X(?=[[=e=]])\X(?=[[=g=]])\X(?=[[=n=]])\X(?=[[=a=]])\X(?=[[=i=]])\X(?=[[=t=]])\X(?=[[= =]])\X(?=[[=u=]])\X(?=[[=n=]])\X(?=[[= =]])\X(?=[[=g=]])\X(?=[[=r=]])\X(?=[[=a=]])\X(?=[[=n=]])\X(?=[[=d=]])\X(?=[[= =]])\X(?=[[=c=]])\X(?=[[=a=]])\X(?=[[=p=]])\X(?=[[=h=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=n=]])\X(?=[[=a=]])\X(?=[[=u=]])\X(?=[[=m=]])\X(?=[[=,=]])\X(?=[[= =]])\X(?=[[=q=]])\X(?=[[=u=]])\X(?=[[=e=]])\X(?=[[= =]])\X(?=[[=l=]])\X(?=[[='=]])\X(?=[[=a=]])\X(?=[[=i=]])\X(?=[[=e=]])\X(?=[[=u=]])\X(?=[[=l=]])\X(?=[[= =]])\X(?=[[=o=]])\X(?=[[=t=]])\X(?=[[=a=]])\X(?=[[= =]])\X(?=[[=s=]])\X(?=[[=a=]])\X(?=[[= =]])\X(?=[[=f=]])\X(?=[[=l=]])\X(?=[[=u=]])\X(?=[[=t=]])\X(?=[[=e=]])\X(?=[[= =]])\X(?=[[=e=]])\X(?=[[=t=]])\X(?=[[= =]])\X(?=[[=s=]])\X(?=[[=o=]])\X(?=[[=n=]])\X(?=[[= =]])\X(?=[[=b=]])\X(?=[[=a=]])\X(?=[[=t=]])\X(?=[[=o=]])\X(?=[[=n=]])\X(?=[[= =]])\X(?=[[=d=]])\X(?=[[=e=]])\X(?=[[= =]])\X(?=[[=s=]])\X(?=[[=o=]])\X(?=[[=n=]])\X(?=[[= =]])\X(?=[[=c=]])\X(?=[[=a=]])\X(?=[[=n=]])\X(?=[[=o=]])\X(?=[[=e=]])\X Which does match, also, the two lines of the new tab ! In conclusion, this method allows you to search for a stream selection of characters, regardless of the syntax of the accented characters within that selection ! Best Regards, guy038
  • HELP on Macros - security issue?

    3
    1
    0 Votes
    3 Posts
    418 Views
    PeterJonesP
    User Manual has been updated: Renamed header to “shortcuts.xml Security” and includes mention of Macros as well: https://npp-user-manual.org/docs/config-files/#shortcutsxml-security added Macros Security on the macros page: https://npp-user-manual.org/docs/macros/#macro-security added a paragraph linking to the “shortcuts.xml Security” page in the Running External Commands page: https://npp-user-manual.org/docs/run-menu/#security-is-your-responsibility
  • Issues with XML highlighting text

    6
    1
    1 Votes
    6 Posts
    425 Views
    J
    @PeterJones I was looking at style for CDATA instead of SGML, so that explains it. Thanks a lot for the help!!
  • 1 Votes
    6 Posts
    2k Views
    PeterJonesP
    @Elayne-T , Do you have your ?-menu’s Debug Info? Do you have plugins in Notepad++ that might be doing something in the background? (Maybe a plugin has popped up a dialog, but because they didn’t code it right, the dialog doesn’t go in fron of Notepad++'s always-in-front.) Do you have a file open that requires Admin privileges to write/save? If so, maybe Windows has popped up the UAC, but it didn’t get to take your full screen like it normally would (the UAC shield icon would be on your taskbar if it’s an issue with the UAC) Do you have anything other than Notepad++ and your browser running? Do you have any applications like AutoHotKey, which assign global hotkeys that maybe it’s interpreting some sequence of keystrokes you are using to Does your browser have any extensions/plugins that might be trying to steal focus away from Notepad++? It will be easier to replicate and find if you give as many details and pieces of relevant information as possible, otherwise something as nebulous an unrepeatable as this is going to be difficult to find. update: one more idea: in the older posts, they mentioned that they’d click in Notepad++ to activate, then after a few seconds of typing, the focus would be lost. Is that the case for you? If so, did you leave the mouse pointer somewhere over the Notepad++ window when you started typing? Or does the mouse pointer start drifting off accidentally (maybe you bumped the mouse while typing, or it gets shaken while you type fervently)? Or does the mouse pointer get moved off intentionally (for example, when I was experimenting with always-on-top, I would move the mouse pointer back over the Chrome window, then use the scrollwheel to scroll the browser tab without clicking in the browser). If your mouse pointer is back to being over the browser (or some third app), maybe something in that other app grabs focus when you leave your mouse lingering over it (I know that some linux GUI will give apps focus whenever the cursor hovers over them, even if they haven’t been clicked to the foreground… maybe some other app – your browser or something else – has given itself such a feature, even on Windows.)
  • Bug: Empty file with UTF-8 encoding saved as ANSI

    8
    1 Votes
    8 Posts
    2k Views
    MarkusBodenseeM
    @Coises said: What is really means is, when Notepad++ opens an existing file that contains only ASCII characters, it should treat it as UTF-8 rather than as ANSI. Yeah, so for example: “Treat ASCII-only files as UTF-8 (instead of ANSI)” or something similar could be a more clear wording for the option. Which, for me, raises the question: Why is this only available when UTF-8 is the default encoding for new files? It would add a bit more flexibility to the user, but on the other side it seems very unlikely to set this option if you don’t want UTF-8 as default. So I guess it could be a preventative measure that the user doesn’t set any confusing options.
  • What is BUFFERENCODING.COOKIE ??

    11
    0 Votes
    11 Posts
    5k Views
    PeterJonesP
    because it appears those actually return from the enum UniMode, which is enum UniMode {uni8Bit=0, uniUTF8=1, uni16BE=2, uni16LE=3, uniCookie=4, uni7Bit=5, uni16BE_NoBOM=6, uni16LE_NoBOM=7, uniEnd}; according to the source code. In N++ commit 8149f72 in v8.8.8 (Nov 2025), uniCookie has been renamed as uniUTF8_NoBOM inside the N++ source. Thus, I just put in PythonScript Issue #421 to request that there’s a BUFFERENCODING.UTF8_NOBOM, either as replacement or alias of the old meaninglessly-named BUFFERENCODING.COOKIE … I don’t know if it will happen, but at least the request is in. :-)
  • 0 Votes
    13 Posts
    4k Views
    dr ramaanandD
    @guy038 Merci beaucoup!
  • Unable to open files within an opened file

    3
    3
    0 Votes
    3 Posts
    1k Views
    R
    @PeterJones Perfect thank you very much!
  • 0 Votes
    15 Posts
    5k Views
    mpheathM
    The Python script I posted is expected to handle single byte errors from UTF8 decoding. Asian languages can be 2 byte for ANSI and so the script may need to get the following byte too to decode both bytes properly. Probably will not find recovery tools and the like that will fix mixed encoding errors as the solution in some cases might be worse then the problem though in this case tested OK. Once saved, then there might be no going back and so creating a backup before the operation would be wise. Inspect the results to confirm is OK.
  • When Is the Next Update?

    bug with 8.9.6.4 html
    4
    0 Votes
    4 Posts
    2k Views
    PeterJonesP
    @Sylvester-Bullitt , Release Candidate is available. You probably want to test this version, and report any continued problems with the Open File feature ASAP.
  • Need help with find and replace using wildcards and in multiple files

    11
    1 Votes
    11 Posts
    4k Views
    P
    @PeterJones Worked perfectly, thank you.
  • Latex in markdown not working in npp 8.9.6.4 (64 bits)

    2
    0 Votes
    2 Posts
    1k Views
    PeterJonesP
    @Mario-Lemelin , everything work fine except for the equations in latex Not all Markdown processors understand LaTeX. (For example, the Markdown processor for this forum does not.) It appears that MarkdownViewer++ does not have that feature (which doesn’t surprise me). I visited this site (https://github.com/npp-plugins/plugintemplate) but was unablew to find help. That site is just the repository for the C++ template for creating a plugin. It’s not going to have information on how to use any specific plugin. The home for MarkdownViewer++ is https://github.com/nea/MarkdownViewerPlusPlus , so that’s where you’d have to go. But the author has recently set the repo to “read only”, indicating that they are unwilling to support that plugin any more. However, there are other Markdown plugins available from Plugins Admin. I’ve never used them, but two I see include NppMarkdownPanel @ https://github.com/mohzy83/NppMarkdownPanel AnotherMarkdown @ https://github.com/ezyuzin/NppAnotherMarkdown this appears to be a fork of NppMarkdownPanel with a different feature set. when I look at its README, it mentions the ability to use katex for math (I think it’s an option that you’d have to enable by editing a config file for the plugin; you’d want to experiment and read the documentation for that plugin to be sure) – and a quick look at the katex description implies to me that it’s essentially LaTeX compatible syntax. You can install either of those from the Plugins Admin interface. It may be that one of those will do what you need (my bet would be on the second as your best chance).