• Open Notepad++ via command line with a certain character set

    14
    1 Votes
    14 Posts
    2k Views
    Alan KilbornA

    Earlier I had said:

    IMO, it makes more sense to have your proposed command line work as follows:

    notepad++ yourfile1.ext -charset=“OEM 850” yourfile2.ext -charset=“UTF-8 BOM” yourfile3.ext yourfile4.txt

    While that’s an idyllic command line, logically, it doesn’t really suit how Notepad++ currently works; example:

    notepad++ -multiInst -n15 yourfile1.txt -n10 yourfile2.txt

    While this will open “yourfile1.txt” at line 15, it will NOT open “yourfile2.txt” at line 10.

    But this:

    notepad++ -multiInst -n15 yourfile1.txt yourfile2.txt

    will open both files at line 15.

    So I think it is reasonable to allow only one -charset=... on a command line, that affects all following files; example:

    notepad++ yourfile1.ext -charset="UTF-8 BOM" yourfile3.ext yourfile4.txt <-- contains only ONE charset directive.

    If a second -charset is encountered on the command-line, it would be ignored.

  • 0 Votes
    3 Posts
    505 Views
    PeterJonesP

    @Jimmy-C_1013 ,

    If I am understanding correctly, you have hundreds/thousands of files, each with a particular naming scheme. Inside each of these files, you have the word number at least once, and you want to replace that word with part of the filename (extracted from the filename, based on the scheme you mentioned).

    Notepad++ search-and-replace does not have access to the filename, so it cannot be done natively inside Notepad++.

    However, by a clever combination of command-line and Notepad++ manipulation, you may be able to implement something that will work for you. For example, earlier this year someone asked about just inserting the whole filename into their file(s) overtop of a PLACEHOLDER variable in the discussion here – my reply, and the follow-ons, show one way in which this can be accomplished. Using the same command-line portion, and then tweaking the regex to use number instead of PLACEHOLDER should get you pretty close to what you want.

    Good luck.

    ----

    Useful References Please Read Before Posting Template for Search/Replace Questions Formatting Forum Posts FAQ: Where to find regular expressions (regex) documentation Notepad++ Online User Manual: Searching/Regex
  • accented characters as hex

    3
    0 Votes
    3 Posts
    1k Views
    gerdb42G

    @Zsolt-Tomo,

    your xml file should have an XML-Prolog in the first line which states the encoding to use:
    <?xml version="1.0" encoding="Windows-1252"?>
    If this line is missing, UTF-8 will be assumed since that is the default for XML files. If the prolog is set, the XML-lexer will set the document encoding accordingly.

  • Problem replacing huge number of characters

    2
    0 Votes
    2 Posts
    688 Views
    PeterJonesP

    @José-Federico-Sánchez-Sevilla ,

    Bioinformatic data is often huge files. Above about 200MB, Notepad++ starts having difficulty with large files, because of all the “extra” stuff that Notepad++ is trying to do, like syntax highlighting, and “smart match”, line-wrap, and other similar features.

    At some point, Notepad++ developers put in a hook that above 200MB, it would arbitrarily turn off syntax highlighting, but not the other features, which helped some, but not enough for some users. (Whereas other users hated that their file would syntax-highlight at 190MB but not at 210MB.)

    In the upcoming v8.4.7, there is a new tab on the Settings>Preferences dialog for changing performance settings, including changing whether it’s at 200MB or some other threshold, and the ability to enable or disable other high-performance-drag features so that you can decide how much to use. You might want to grab the release candidate for v8.4.7 and see if those options allow you to improve the performance enough to be usable for you.

  • Problem with long file names

    3
    0 Votes
    3 Posts
    345 Views
    Henry GH

    Excellent! Thank you :-}

    And I’m sure it will come in use elsewhere.

  • Display left arrow after RetVal in auto_Complete

    9
    0 Votes
    9 Posts
    578 Views
    José Luis Montero CastellanosJ

    @PeterJones
    Heh heh Perfect!
    When I pasted the graphic character ←, an â appeared instead, but it was enough to enter the hex code (entity) &#x2190 ; and everything worked. Now to find and replace everything, and enjoy with the Npp.
    Thank you so much!

  • Help with specifying a new UDL

    4
    0 Votes
    4 Posts
    337 Views
    Michael VincentM

    @Ken-Weinert said in Help with specifying a new UDL:

    Now knowing that it’s a plugin

    If it’s JSON you want, there is a JSON pretty-print feature in JSONTools.

    Cheers.

  • How to compare two .php files in Notepad

    2
    0 Votes
    2 Posts
    272 Views
    PeterJonesP

    @Irek ,

    Use the ComparePlus plugin.

  • Color next to line number

    7
    0 Votes
    7 Posts
    4k Views
    C TC

    @PeterJones Thank you very much, resolved

  • 1 Votes
    42 Posts
    42k Views
    Alan KilbornA

    @PeterJones said:

    It does stay off, unless you have multiple instances open simultaneously. In which case, as has always been the case, settings changes do not propagate from one instance to a different, already-open instance, and only one instance has authority to write its configuration to disk. This is nothing new.

    User manual REFERENCE for this for @rebber2.

  • User-defined language is ignored since 8.4.6

    5
    0 Votes
    5 Posts
    724 Views
    Lycan ThropeL

    @PeterJones ,

    I need to upgrade my version also, but I’ve just recently noted that using NPP to open a file one has right-clicked on and selected NPP to use, that it pulls up the new file, which it’s supposed to, but have noticed also, that when I switch to the previous document that came up with the right-clicked file, that my dBASEPlus UDL’s autoCompletion was not working on that file…until NPP is closed and then opened itself…and then the file would work with the autoCompletion again. Was going to write about it, but I’ll upgrade first and see it’s fixed according to your post. Thanks.

  • Find and Replace specific word in strings that start with...

    2
    0 Votes
    2 Posts
    306 Views
    Alan KilbornA

    @flux4201

    What you are looking has been dealt with before; see if THIS POST makes sense to you in regards to how it is accomplished. Ask further questions here if needed.

  • How to silently deploy v8.4.x

    7
    0 Votes
    7 Posts
    36k Views
    xomxX

    @PeterJones
    @Alan-Kilborn

    https://nsis.sourceforge.io/Which_command_line_parameters_can_be_used_to_configure_installers%3F

    So there is a “glue code in .onInit” possibility to overcome this sensitivity. But this needs a PR.

  • Mark spesific lines before a suffix

    5
    0 Votes
    5 Posts
    292 Views
    ?

    @PeterJones

    okay, thank you bro

  • 0 Votes
    3 Posts
    412 Views
    SN-CHS

    @PeterJones Thank you very much for such detailed explanation. You are right the crux of the problem was the fact I confused what was N++ functionality and what was that of the plug-in (you know how it goes, I installed that plug-in many years, it all just worked with every N++ update, so I did not give a thought to it).

    Upon realising my mistake, I was able to fix it myself using information on the page of the manual you referred to (the xml-file was in the old format, in deed, so the icon set look got back to what I want it to be as soon as I edited the file in accordance with provided guidelines).

    Thank you again, you have been most helpful!

  • List Flushing

    7
    0 Votes
    7 Posts
    387 Views
    PeterJonesP

    @Zaine-Pittman ,

    what I want my website’s lists to look like

    Wait! So are you saying you are trying to change what your website looks like? That is, that you want to control how a browser controls the rendering of your HTML? No setting in Notepad++ will change how the browser renders your HTML. You need to find an HTML help site to teach you how to affect the presentation of <ol> and <ul> on HTML websites. Notepad++ cannot change how your website is rendered. The settings Alan and I were talking about are purely controlling how Notepad++ will render a list when it is editing the file.

  • Find Lines starting with #

    8
    0 Votes
    8 Posts
    17k Views
    Eric CoxE

    That worked. You are the best!!!

  • Can't see arrow on style configurator- too dark

    3
  • How to COMPLETELY undo Dark Mode?

    4
    0 Votes
    4 Posts
    813 Views
    David Brigden52D

    @John-Humkey said in How to COMPLETELY undo Dark Mode?:

    the icons at the top (3rd line) are now wireframe, even when I turn Dark Mode off.
    Ok, that ticked me off, but I was living with it.

    You don’t have to live with it, you just have to manually change your toolbar back to the standard icons.

    Go to Settings -> Preferences. -> General (Preferences should start with the General section) and there is a Toolbar group of radio buttons. Change from whichever FluentUI icons you have (Probably FluentUI: Small) to Standard Icons: Small

  • Patching Type

    5
    -1 Votes
    5 Posts
    387 Views
    Lolli NisbetL

    @PeterJones Thank you that answers it :)