Categories

  • Announcements regarding our community
    303 Topics
    5k Posts
    PeterJonesP

    @joemidnite said in Notepad++ release 8.9:

    it does not address the 2nd JavaScript theme. Would the new install delete the 2nd theme, or should I delete both before I do the update?

    I don’t know what you mean by that. The instructions tell you how to fix JavaScript in your active theme.

    Specifically, it says, and I quote, “You can just copy the entire <LexerType name="javascript.js" desc="JavaScript" ext="">...</LexerType> section from the downloaded theme(s) and paste it overtop that same section in your Config Directory and/or Installation Directory theme file(s), then save and restart to get it to take effect.”

    So you download the newer file to some temporary location and open it. Then you open your active theme (in either the install directory or AppData, depending on whether you’ve customeized your theme or not), and you paste the javascript.js section from the temporary file overtop the javascript.js section from your active file. Then you save, and restart Notepad++.

    if you haven’t customized your theme at all (no changes to font or color or user keywords or user extensions anywhere), then it’s even easier: just download the file, and save it in your install directory’s themes subdirectory, and restart.

  • Frequently Asked Questions and Guides (about Notepad++ and this Forum)

    38 Topics
    63 Posts
    PeterJonesP
    Themes in v8.8.9

    With the release of v8.8.9, there is a new feature which automatically updates the active Theme if it is missing Style Configurator settings for any GUI elements, or missing any Languages or any Style entries in existing Languages. This is a long-needed feature, so that as Notepad++ adds new styles for the Style Configurator, you’ll be able to set them, even if your theme hasn’t been updated since before those styles were added. (Before now, if you switched to a theme years ago and set any custom color or user keyword or custom file extensions for a built-in language, it would never update the theme, no matter how many times you update Notepad++ in the meanwhile. This v8.8.9 feature is able to correct that issue, and you will be able to use the Style Configurator to set the colors of any new styles going forward, as soon as you upgrade to a Notepad++ executable that supports the new style.)

    Unfortunately, the v8.8.9 implementation included some annoying growing pains: the procedure always uses the same colors that those styles have in the stylers.model.xml file (ie, the default “light mode” colors), even if you are using a dark theme, which can make for glaring color issues: on Languages that get new styles added, the text that should be that new style can end up as black-on-white text, even if the rest of the text has a dark background; and if the theme was old enough, some GUI elements (like the Bookmark margin and Change History margin, between the line numbers and the text being edited) may clash with the surrounding GUI elements.

    In the future v8.9 this issue will be fixed, so people who had an older theme and use v8.9 will see new styles show up using the default foreground and background colors of that theme, so they won’t clash: it might not highlight the new keywords, for example, but at least it won’t look worse than it used to.

    But unfortunately, once you run it in v8.8.9, your theme will no longer have those entries “missing”, and the glaring white background will be saved. The instructions below will help you with that:

    Instructions

    These instructions are only needed if you ran Notepad++ v8.8.9. If you upgraded from something earlier to v8.9-or-later, you do not need these instructions.

    Download the updated theme file(s) from the Source (see Download Source below) Depending on circumstances, decide whether you need to update the installation-directory theme, the user-config-directory theme, or both If you have a portable version of Notepad++, without using the Cloud directory or -settingsDir, then you need to just follow the instructions to Update Theme(s) in User Config Directory If you are not using a portable version of Notepad++, then it is recommended to follow Update Theme(s) in Installation Directory first, and then decide based on the next item whether to continue or not If you have any theme file(s) in the user-configuration directory (whether it’s %AppData%\Notepad++\themes\ or the Cloud directory’s .\themes subdirectory or the -settingsDir’s .\themes subdirectory, then you should follow the Update Theme(s) in User Config Directory for those.

    Please note: when correctly following step 2, you may need to follow multiple sets of instructions. Please read and understand each point under step 2 to make the right changes.

    Download Source

    The installer themes in the source code have been updated to have all the styles needed (to be able to fix the problems from v8.8.9). You can go here to grab the theme file(s) you want: https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/PowerEditor/installer/themes.

    Update Theme(s) in Installation Directory

    Except when you have a portable version of Notepad++, you will generally need to follow this set of instructions for the themes that come in the installation directory. In a normal installation of Notepad++, the installation will be in c:\program files\Notepad++ directory or equivalent, and the installation-directory themes will thus be in c:\program files\Notepad++\themes. (See the Instructions section above for the decision process to know for sure whether to use this section.)

    Exit Notepad++ Go to the URL mentioned in the Download Source section (above), and download the raw version of your Theme file(s) Use Explorer to go to c:\program files\Notepad++\themes\ directory Copy the downloaded Theme(s) into that directory, overwriting what’s there When you run Notepad++ next time, it will use the updated theme, and the glaring color issues should be gone.

    If you have customized your theme with user-keywords or user-extensions, then this won’t be sufficient, because Notepad++ gives priority to the copy from the user-settings directory. (See the Instructions section above for the decision process to know for sure whether this section is sufficient for your needs.)

    Update Theme(s) in User Config Directory

    If you have your Theme file in the user-settings directory (AppData hierarchy or Cloud directory or -settingsDir directory) for any reason – whether you customized it by changing the font or color or added user-defined keywords or user-defined extensions using the Style Configurator, or whether you intentionally copied or downloaded a Theme into the user-settings directory, or whether it’s there and you don’t know how or why it got there: under any of those circumstances, then just replacing the theme in the installation directory won’t be sufficient. (See the Instructions section above for the decision process to know for sure whether to use this section.)

    Exit Notepad++ If you haven’t already, go to the URL mentioned in the Download Source section (above), and download the raw version of your Theme file(s) Use Explorer to go to %AppData%\Notepad++\ (🛈) or to wherever your Cloud Directory or -settingsDir option point to There should be a themes subdiretory in that directory, if you have customized your Theme. Rename your old custom theme to <themeName>_OLD.xml (like khaki.xml becomes khaki_OLD.xml) Copy the downloaded version of the Theme into that directory (for example, khaki.xml) Start Notepad++. It will use the updated version of the theme, but your customizations will be temporarily missing. Open %AppData%\Notepad++\themes\<themeName>.xml and %AppData%\Notepad++\themes\<themeName>_OLD.xml In the _OLD copy, search for ext="(?!") in Regular Expression mode. The value between the quotes will be the user-extensions for that language. Copy any that you find in the OLD file to the language’s equivalent entry in <themeName>.xml In the _OLD copy, search for (?<!>)</WordsStyle> in Regular Expression mode. Any values between the > and the </WordsStyle> should be copied to the equivalent location in the <themeName>.xml file. If <themeName>.xml just has <WordsStyle name="..." ... /> without having a </WordsStyle> closer, you can replace the /> with a > and the list of keywords, then the closing </WordsStyle> Save <themeName>.xml Exit Notepad++ When you run Notepad++ again, it should now include your customizations again. Native Feature compared to ConfigUpdater plugin

    The ConfigUpdater plugin was introduced as a testbed for some of the ideas that made it into the v8.8.9 native implementation. As such, if you are in v8.8.9 or newer, you no longer need the ConfigUpdater plugin. But if you are before v8.8.9, and waiting for the v8.9 fix to the Notepad++ feature before upgrading, then using ConfigUpdater while in v8.8.8-or-older will help you get to a point where if you did change your mind and upgrade to v8.8.9, it wouldn’t make the glaring UI clash and black-on-white text in dark themes.

    JavaScript in v8.9 Themes

    In v8.8.8 and earlier, Notepad++ would magically use the embedded javascript (JS-in-HTML) styler settings if the javascript.js (*.js) language didn’t have defined styles in a given theme, making it appear to JavaScript users that their theme had the standalone JavaScript colors defined. The v8.9 fix, which filled in default FG/BG colors for all javascript.js styles for themes that were missing javascript.js made it appear to the JavaScript users that v8.9 broke their theme, when it really meant that their already-broken theme was just being “fixed” in a different way. Updated themes are being submitted to the Notepad++ codebase, so that javascript.js will use similar colors to embedded javascript, so they won’t get the surprise color change if they upgrade from v8.8.8-or-plder to v8.9.1-or-newer.

    If you already updaded to v8.9, and JavaScript *.js files look like they have stopped syntax highlighting then you will need to follow instructions similar to the Update Theme(s) in Installation Directory and/or Update Theme(s) in User Config Directory

    Until the PR has been merged, you can use https://github.com/pryrt/notepad-plus-plus/tree/javascriptTheme/PowerEditor/installer/themes as the source for the updated themes (once the PR is accepted, this link will be deleted from the FAQ, and you can use the files from the Download Source link, above). You can just copy the entire <LexerType name="javascript.js" desc="JavaScript" ext="">...</LexerType> section from the downloaded theme(s) and paste it overtop that same section in your Config Directory and/or Installation Directory theme file(s), then save and restart to get it to take effect.
  • Notepad++ discussions that don’t fit in other Categories

    4k Topics
    22k Posts
    Eugene BrennanE

    Surprisingly, it appears difficult to find an answer to this from Googling. I want to migrate articles from a website to Blogger. I’m using Reader View in Firefox which strips a lot of the superfluous stuff on the source website and then I paste to Notepad. From there I copy and paste to Blogger. Now this strips all HTML tags and when I post from Notepad to Blogger, all the content is enclosed by a single <p> tag and multiple <br /> tags within the text. I can’t paste directly from the source website to Blogger because it brings in a lot of unwanted HTML stuff from the previous website. This causes multiple problems that I won’t detail here, mostly as regards inserting images into the text. So my question is, does Notepad++ strip all HTML (I can’t find any way of changing to HTML view mode like I can in the Blogger Designer) and if so, is there a way I could retain at least <p> and <br /> tags?

  • 10k Topics
    54k Posts
    PeterJonesP

    1: How can I tell NP++ to search for multiple different text snippets at once? For example all instances of 45/23 31/89 and 21/77 should all be replaced with 66/55

    (a|b|c) will match a or b or c, so for the exact three you said, it would be (45/23|31/89|21/77) as the FIND and 66/55 as the replace.

    But if you’re not describing it well, and you just want any two-digit fractions of the form ##/## to be replaced with 66/55, then it would be \d\d/\d\d (where \d is regex-speak for “any digit”)

    If neither of those is what you really want, you will need to give more examples of what should and shouldn’t match.

    2: How can I tell NP++ to delete the first three lines and the last four lines (the last line is always empty) of a file?

    First three lines: FIND \A(^.*?\R){3} will match the start of file and the first three lines, and replacing that with empty text will delete them.

    Last four: FIND (^.*?\R){4}\Z will match four lines and the end-of-file, so replacing that with empty text will delete them.

    Fancy: do both with the | to say “either/or”, so FIND = \A(^.*?\R){3}|(^.*?\R){4}\Z

    (don’t have . matches newline enabled)

    All of that syntax is described in the User Manual regex section, so if you want more details, you can load that page and use your browser to search for \A or \Z or similar; the concepts used were anchors (for beginning/end of file), multiplying operators (for doing N lines), and groups (so the multiplying operators apply to the entire-line matcher)

    200 files

    Regex will work in the Find in Files, which is how you make it apply to that many files. But try it in one open file first, to make sure it does exactly what you think. And for bulk operations, always keep a backup, in case things don’t go as you expected.

    ----

    Useful References Please Read Before Posting Template for Search/Replace Questions Formatting Forum Posts Notepad++ Online User Manual: Searching/Regex FAQ: Where to find other regular expressions (regex) documentation
  • Technical discussion of building or contributing to Notepad++ or Plugin codebases

    1k Topics
    9k Posts
    h-jangraH
    1.8.0.0 Fixed Visual mode stability – Corrected selection behavior and motion consistency iW / aW – Improved big-word text object handling Added Visual Mode gq / gw – Wrap selected text U / u – Convert selection to uppercase / lowercase J – Join selected lines r – Replace selected characters S – Substitute selection with input text Normal Mode ( / ) – Move between sentences M – Jump to middle of the screen ge – Move to end of previous word gE – Move to end of previous WORD gf – Open file under cursor gx – Open URL under cursor J – Join lines without extra space zt / zb – Scroll line to top / bottom of window zc / zo – Close / open fold gi – Jump to last insert position [ / ] – Structured navigation (blocks / sections) gU / gu – Uppercase / lowercase motion gUU / guu – Uppercase / lowercase entire line gd – Jump to first occurrence of symbol Ctrl+E / Ctrl+Y – Scroll window down / up Ctrl+F / Ctrl+B – Page forward / backward gJ – Join lines without inserting space S – Substitute entire line | – Jump to specific column gI – Insert at first non-blank character Command Mode sort / sort! – Sort lines (normal / reverse) sort n / sort n! – Numeric sort (normal / reverse) noh / nohl / nohlsearch – Clear search highlights set nu / set number – Enable line numbers set nonu / set nonumber – Disable line numbers set tw= – Set text width wa / wall – Write all buffers qa / qall – Quit all buffers wqa / xa / xall – Save and quit all e / edit Refresh file bp / bprev / bprevious – Go to previous buffer bd / bdelete – Delete buffer sp / split – Horizontal split vs / vsplit – Vertical split tabn / tabp – Next / previous tab about - Show about dialog config - Show configuration h/help - Open command help t/tut/tutor - Open tutor s/old/new/ - Regex Substitute s/foo/bar/g - Replace all matches in line s/foo/bar/c - Replace with confirmation s/foo/bar/gc - Replace all in line (confirm) s/foo/bar/i - Case-insensitive replace s/foo/bar/l - Literal (no regex) replace %s/foo/bar/gc - Replace in whole file (confirm)
  • Security shouldn't be the privilege of rich people
    63 Topics
    301 Posts
    donhoD

    @xomx said in Help needed - Forensic extractor result analyzing:

    @donho

    What is that for (is it for specific HW, OS or network analysis)?

    Ubuntu on a VPS

    Fullname of the forensic SW

    “Forensic Extractor”

    ballpoint.fr

    It’s rather to analyze the results to make sure if anything is OK. Note the VPS is only for the wingup.org, whereas notepad-plus-plus.org is on a sharing hosting service.

    Thank you for the ref
    I will check this company.

  • All the issues (publications/questions) about binary translation
  • Say fuck to Notepad++ here, and only here
    91 Topics
    524 Posts
    Артем МитичкинА

    I hate this editor for his political position. Gone forever.

  • No support request and bug report here, only unconditional praise and worship

    2 Topics
    6 Posts
    FreeMeowF

    Praise Notepad++.png

  • Share personal tips and cool uses for Notepad++, and similar

    59 Topics
    220 Posts
    Tomas VirginT

    Talking about “the game of the summer,” it’s always interesting to see how different communities interpret “fun” — for some that’s about building an in‑game world, for others it’s just kicking back and enjoying downtime.

  • Computer/Programming Jokes are welcome here