• About UTF-8 encoding...

    General Discussion
    1
    2 Votes
    1 Posts
    704 Views
    No one has replied
  • 0 Votes
    19 Posts
    2k Views
    CoisesC

    Reported as Issue #17033.

  • 0 Votes
    9 Posts
    363 Views
    Dan EastwoodD

    @PeterJones

    That seems to have done the trick!

    Thank you so much for all your help today.
    alt text

  • 1 Votes
    3 Posts
    120 Views
    Lars RasmussenL

    @PeterJones Exceptional, thanks for the help!

  • 0 Votes
    2 Posts
    132 Views
    Terry RT

    @mostlyhuman

    If you happened to look at the online manual in reference to this:
    NPP tabs settings it will say:
    Clicking that hollow icon, will “pin” the tab, which will change the icon to a filled-in “pin”, and will move the tab to the left side of the Tab Bar (before any unpinned tabs, but after any tabs that are already pinned).

    So currently only left.

    As stated in the FAQ section you could request a “new feature”. Read the post titled Feature Request or Bug Report as to how to go about requesting this.

    I will say though that unless you get some followers for this idea it might be unlikely the developer will want to expend valuable time coding it into the application.

    Terry

  • 0 Votes
    3 Posts
    237 Views
    Alain SamounA

    @Terry-R said in color change after downloading:

    style configura

    Thaks Terry, that was quick! I did not know that the style config depended on the type of file; in my case, it was a batch file. Thanks again.
    Alain

  • 3 Votes
    1 Posts
    324 Views
    No one has replied
  • 4 Votes
    3 Posts
    3k Views
    CoisesC

    I wrote in SCI_GETCODEPAGE is NOT always either 0 or 65001:

    When I did a test by changing my system default character set to Japanese, I started a new file, set it to ANSI, and pasted in some Japanese text. SCI_GETCODEPAGE was 932. I saved it that way. When I opened it again, the encoding was set to Shift-JIS — not ANSI — and SCI_GETCODEPAGE was 65001.

    For future reference:

    This only happens if Settings | Preferences | MISC | Autodetect character encoding is checked. When it is not checked, the file opens, as expected, as ANSI (SCI_GETCODEPAGE returns 932).

  • Search upper direction is DAMM slow...

    General Discussion
    2
    0 Votes
    2 Posts
    673 Views
    PeterJonesP

    @Shin-ichiroh-Sakagami ,

    I just created a text file (Language > None (Normal Text)) with ~16M copies of the line this is just one line, with 1 in 1024 having -- with extra appended to the end.

    When I search forward or backward for extra (SearchMode=Normal, not Regular Expression), it takes the same amount of time to search forward or backward. It’s definitely slow – as is everything when dealing with 10M lines – especially for Ctrl+HOME or Ctrl+END, but I don’t notice any difference between forward and backward search.

    You might check your Settings > Preferences > Performance settings, and see if any of those help. If your log file is being syntax highlighted, you might want to change the performance threshold so that it’s not syntax highlighted, and it might speed up.

    (If you were using Regular Expression search mode, and you had done the power-user config to allow backward regex, you need to know that backwards regex are not as efficient as forward, because the regex engine wasn’t optimized for backwards search.)

  • Get undo to scroll to context

    Help wanted · · · – – – · · ·
    2
    0 Votes
    2 Posts
    280 Views
    PeterJonesP

    @page200 ,

    As you have guessed from two weeks with no reply, Notepad++ doesn’t have that feature.

    I’m sorry no one had replied yet. Sometimes that happens if no one has a good idea right away.

    I didn’t have time two weeks ago, but I did today, so I hacked up a pair of scripts for the PythonScript plugin.

    Install PythonScript 3.0.22 or later per the PythonScript 3.0.x instructions in our PythonScript FAQ Create and populate the new script undo_and_scroll.py using the source below and the instructions for “create” and “populate” in the FAQ Create and populate the new script redo_and_scroll.py using the second source below and the same instructions Verify them using Plugins > Python Script > Scripts > undo_and_scroll or redo_and_scroll Once they are working, if you want, you can follow the FAQ instructions to create a shortcut for each (you could replace the Ctrl+Z and Ctrl+Y – but you’d have to use the shortcut mapper on the Scintilla commands page to remove those shortcuts from SCI_UNDO and SCI_REDO)

    undo_and_scroll.py:

    # encoding=utf-8 """in response to https://community.notepad-plus-plus.org/topic/27122/ This does the UNDO then tries to scroll to approximate center """ from Npp import editor # undo editor.undo() # find location after undo pc = editor.getCurrentPos() c = editor.lineFromPosition(pc) editor.gotoLine(1) editor.gotoLine(c) editor.setCurrentPos(pc) # try to center it # this is counting >1 for a wrapped line, whereas the "Line" commands are logical line, but close enough h = editor.linesOnScreen() f = editor.getFirstVisibleLine() s = int(c - h/2) #console.write(f"h={h}, f={f}, c={c}, s={s}\n") editor.lineScroll(0, s) del(pc) del(c) del(h) del(f) del(s)

    redo_and_scroll.py:

    # encoding=utf-8 """in response to https://community.notepad-plus-plus.org/topic/27122/ This does the REDO then tries to scroll to approximate center """ from Npp import editor # redo editor.redo() # find location after undo pc = editor.getCurrentPos() c = editor.lineFromPosition(pc) editor.gotoLine(1) editor.gotoLine(c) editor.setCurrentPos(pc) # try to center it # this is counting >1 for a wrapped line, whereas the "Line" commands are logical line, but close enough h = editor.linesOnScreen() f = editor.getFirstVisibleLine() s = int(c - h/2) #console.write(f"h={h}, f={f}, c={c}, s={s}\n") editor.lineScroll(0, s) del(pc) del(c) del(h) del(f) del(s)
  • Lines broken

    Help wanted · · · – – – · · ·
    2
    0 Votes
    2 Posts
    301 Views
    CoisesC

    @Laura-Pla:

    I think I understand what you mean. If so, this is more a matter of getting a clear sense of how text files work than needing to know any particular tricks about Notepad++.

    As a “plain text” editor, Notepad++ just shows you what is actually in the file.¹

    For “normal” characters, “abcdefg” and so on, you just see the character. Line endings — what you get when you press the “Enter” key while editing — are also characters, but they are displayed by starting a new line.

    You can add a line ending any time, between any two characters, by pressing Enter. And you can delete a line ending by putting the typing cursor at the beginning of a line and pressing Backspace, or by putting the typing cursor at the end of a line and pressing Delete.

    What’s probably happening to you is that you’re deleting text without deleting the preceding or following line endings. Typically you’ll want to type a space after deleting the line ending, so the end of what was one line and the beginning of the next don’t run together.

    If you are copying the text from some other source, like a web page or a pdf, an additional complication is that those formats, and others, are not “plain text” and do not always show spaces, line endings and sometimes other characters directly: they display them according rules defined by the format. So you might be seeing them “raw” in Notepad++ (which might even be why you need to “clean” them in the first place).

    In some cases, where you have a sequence of separate lines that should be a single “paragraph” of text, Edit | Line Operations | Join Lines can help; highlight the lines you want to join and select that command from the menu (or type Ctrl+J) and Notepad++ will replace each line break in the highlighted lines with a single space.

    You might already know about this setting, but just in case: on the View menu there is a setting named Word wrap. When that setting is checked, Notepad++ shows lines that are too wide to fit in the window by breaking them at a space character and wrapping them to the next display line. When it is not checked, long lines remain as single lines and you have to scroll to the right to see the parts beyond the edge of the window.

    For a plain text file, you usually want Word wrap checked, because most people type each paragraph without any “hard” line breaks: that way it will fit whatever width window is used to read it. If you need to manage exactly where each line ends (like you would on a typewriter), then you might want it unchecked — but usually, checked is better.

    ¹ There are a couple exceptions, such as syntax highlighting for programming languages, which I’m pretty sure don’t apply to what you’re doing. I describe “Word wrap” a little further down in my message.

  • View Current File In broken?

    Help wanted · · · – – – · · ·
    2
    0 Votes
    2 Posts
    145 Views
    PeterJonesP

    @Michael-C-Rush ,

    Edge works for me (I don’t have FF to test). But until you describe in more detail, I am quite confident there isn’t a bug, because that’s a highly-used feature of Notepad++, and it would surprise me if there were a fundamental bug that you were the first to notice.

    Could you be more specific? You claim there’s “different issues” but don’t explain what they are.

    Share your ?-menu’s Debug Info What are the issues? Does it not show at all? Are you just talking about the HTML doesn’t render as you expect? Because that has nothing to do with Notepad++, and we cannot help you with HTML. (The best way to tell if this isn’t the right place: if writing the exact same HTML code in notepad.exe gives you the same “different issues” in FF and Edge that writing it in Notepad++ did, then the problem is not with Notepad++, and instead it’s with your code.) How is it different between FF and Edge? What’s the filename you are opening? Viewing in the browser is obviously intended for HTML and similar static web technologies Are the changes to the file not yet saved (or is the file an unsaved new # file)? Because if you have made edits to your file, but not saved them, then what you see in FF/Edge will be what you last saved, not what’s currently showing in Notepad++. And if you don’t have any underlying file and are just looking at an unsaved new # file, Notepad++ cannot tell the browser to look at file XYZ because there is no file for it to point to.
  • Find/Replace

    Help wanted · · · – – – · · ·
    2
    0 Votes
    2 Posts
    280 Views
    CoisesC

    @JE-Ramirez

    You can’t enter or paste a sequence of characters that includes a line ending into either box.

    As you observed, when you select the sequence first, it will appear in the Find box. You can’t see the line endings, but they are there.

    At the right of the Find and Replace boxes there is an icon with a drop-down arrow beside it. If you click the arrow, one of the choices is Copy from Find to Replace. Select that to copy the entire Find field, including the invisible line-ending characters, into the Replace field.

  • 0 Votes
    2 Posts
    2k Views
    Mark OlsonM

    @Dinh-Duc-Nguyen
    What do you mean by “large”? If you mean “hundreds of MB”, it’s not uncommon for Notepad++ to become unresponsive for a few seconds while it’s loading the file.

    Also, it would help us diagnose your issue if you shared your debug info (?->Debug Info... from the Notepad++ main menu).

  • Translation/Localization parameter during silent install

    Translation
    3
  • 0 Votes
    6 Posts
    9k Views
    D

    I have noticed that since a few days the context menu appeared on my machine. I have not done anything besides regularly updating Windows and Notepad++.

    So the issue fixed itself.

    b3f0d09e-d651-4d92-acef-6d50025b3323-image.png

  • Need clarification about "built-in" language lexers

    General Discussion
    4
    0 Votes
    4 Posts
    3k Views
    pbarneyP

    @PeterJones said in Need clarification about "built-in" language lexers:

    So I asked ChatGPT why,

    Why would you believe that atrocity?

    It was probably an off-the-cuff question, but I figured I’d take it seriously. I know that this is going off-topic, so feel free to cull this response if you like.

    To tweak the old Russian maxim, it’s very much a case of “distrust until verified” (which is why I posted my question instead of just swallowing what the thing spit out.

    I’m not particularly a fan of them, and I honestly believe that in time, we (as in humanity) may come to regret their invention and our likely inevitable overdependence on them.

    But I’m also not an ignorant neophyte. I’m actually very well aware of the limitations and problems with LLM’s, probably more than most people, and despite that, I’ve found them to be useful in some contexts.

    First, you’re not wrong to call them “random text generators,” but that really is an oversimplification. It’s not just a flat index of word frequencies. Tehy’re trained with billions (or even trillions) of parameters that encode patterns across syntax, semantics and reasoning heuristics. From a purely mathematical point of view, it’s actually pretty intersting. But saying it’s “just statistics” is a bit like saying the human brain is “just firing neurons.” Yeah, it’s technically true, but it misses the interesting part.

    So yes, because they are probabilistic sequence models, they are perfectly capable of fabricating “facts” (i.e., hallucinations, especially with multi-dimensional requests or as the context window gets filled up), making overgeneralizations like missing edge cases, or have issues with compression bias, shallow chain-of-reasoning (although this one is getting a little better), ambiguity drift, context inference biases, fidelity drift when repeatedly iterating through details, context window size limitations for long conversations, etc. I have some experience dealing with each of these limitations to some extent.

    So I know all that going in, and since I do, I know not to rely on them as primary sources, and also how to account for many of those problems and a number of strategies to somewhat limit and mitigate the problems (e.g., authoritative source anchoring, chunking, forcing tabular output, explicitly prompting for blanks instead of it making guesses, etc). If I’m doing anything serious, I’ll use all the tools at my disposal, but I still know that if the output isn’t testable, it’s not trustworthy and I know not to rely on it for expertise; it’s just a tool I use to speed up my info gathering. I think of it as supplementary rather than authoritative.

    So it’s an occasionally useful tool that’s saved me some time by giving me a starting point to quickly gather ideas and point me to things I might not have thought of before I check with reliable sources (like you) that can actually confirm or invalidate them.

    I don’t expect to change any minds about it, and in truth, I don’t really even want to, but you always take the time to thoroughly answer people’s questions, and I wanted to respect that in turn.

  • notepad++ flagged as malicious, should i worry?

    Security
    4
    0 Votes
    4 Posts
    6k Views
    Zhane HernandezZ

    @xomx Thanks for your input, the analysis does seem to be a bit on the… overly cautious or paranoid side.
    maybe it’s time to find a new resource for risk analysis!

  • 0 Votes
    5 Posts
    449 Views
    NicholasN

    Here is my post about changing file type icons in the registry. It also changes the file type descriptions.

  • 0 Votes
    8 Posts
    430 Views
    Neko_KaiohN

    @pbarney Finally, some actual assistance on this forum. Thank you!

    The code I mentioned that was spat out included the <pre>, just in a different format. So I guess my fiddling was on the right path. I appreciate you taking the time to reply though, it gives me more info on what that code is/does.