• doLocalConf.xml still necessary to make NP++ portable?

    3
    0 Votes
    3 Posts
    423 Views
    mkupperM

    @Claudia-Svenson, I am wondering, What are you trying to achieve?

    The reason I ask is that it’s possible to run a “portable” copy of Notepad++ without a doLocalConf.xml file.

    You may want to review https://npp-user-manual.org/docs/config-files/#configuration-files-location.

  • Use mouse browser back/forward button to rotate vertical tabs

    5
    0 Votes
    5 Posts
    885 Views
    Ariel DiamondA

    If anyone else is interested in an AHK script that works, it’s simple enough:

    #HotIf WinActive("Notepad++") XButton1::XButton2 XButton2::XButton1 #HotIf
  • Orange highlighting of everything I copy and paste into a document

    2
    0 Votes
    2 Posts
    282 Views
    PeterJonesP

    @Martin-Neosel ,

    Do you mean the orange bar on the left margin, as shown in this screenshot?
    90102f0a-b5ce-44ca-9472-e03bf0a8d861-image.png

    That’s the Change History. We have a FAQ that explains that feature, and how to turn it off (but also explains why it’s a good idea to leave it on, now that you know what it is).

  • Remove "duplicate" lines based on only a specific part of the line

    4
    0 Votes
    4 Posts
    635 Views
    Terry RT

    @inkognito said in Remove "duplicate" lines based on only a specific part of the line:

    How can I apply it to the text file without opening it in Notepad++?
    Are there any corresponding options over the command line?

    Two very leading but somewhat loosely defined questions.

    Find in Files allows you to select a number of files based on filters, such as folders (and hidden & sub-folders), file type, partial filename. So the files are edited by Notepad++ (NPP) but don’t show in the NPP view(s). You could say they aren’t opened by NPP if you mean “do I see them in the NPP view”.

    I am aware that there is the ability to have an “auto start” functionality upon loading NPP. The information is in the FAQ section here. So it uses the PythonScript plugin along with an “auto-start” script file called “startup.py”. Upon NPP loading it immediately starts processing the commands in this script file.

    There is another PlugIn called NppExec and a post late last year suggested it might have a method on autostarting once NPP is loaded, see post #26006. Unfortunately there isn’t a lot else I have seen on NppExec, it doesn’t tend to get much exposure.

    If you are referring to editing these files without NPP itself loading, then that is a whole other question which resides outside of this forum. Other command line editors such as AWK, SED, GREP etc might offer you that functionality but as I say that is not for this forum to answer. You would need to visit forums based on which ever editor you wish to use. The regular expression I provided might work as is in another editor, but likely would require some massaging to perform correctly.

    Terry

  • Escaping delimiters does not work with UDL.

    2
    0 Votes
    2 Posts
    365 Views
    PeterJonesP

    @Manish-Patel,

    Based on your description, I assume you are seeing something akin to
    e28deaed-860a-4b30-9409-669bbcf0badd-image.png
    … where the regex starts looking like a quote starts inside.

    In that example, I also showed examples of how the escape is actually intentended to work: the “Escape” character escapes the various open/close symbols _when embedded between open/close symbols. So "In \" quotes", it properly treats the \" as being inside the string, not ending the string, and similarly for the single-quote example.

    Since, based on your <Keywords...> line, you don’t have regex defined as delimiters, the parser is not in a mode where it knows it needs to escape them.

    If you define regex wrappers as delimiters as well, like:
    c4459c06-30a2-4102-b735-97449b2d96f2-image.png

    … then you can get it to treat the regex as a string:
    9c3810c4-bef3-4bb0-b24e-9443e312a000-image.png

    The reason the quote isn’t starting a string inside the regex is because, by default, UDL doesn’t allow nesting of delimiters, unless you tell it to in the Stylers. This is more obvious if I do the same regex, but with the quotes not escaped:
    186dddd5-94e5-4595-a12f-d3b85b0f2d2b-image.png

    The quotes are still not treated as string-starters, because the regex delimiters were not defined to allow nesting of the string delimiters.

    On the other hand, if you define Delimiter 5 to be [ and \ and ] and then in the Styler definition you also allow nesting of Delimiters 1 and 2:
    f6821207-5207-450b-98b9-5168b42c7068-image.png

    … then you can get another example, which shows quotes embedded in brackets, and escaped brackets:
    347cbe63-ed9c-482b-8cbd-97498d8cc7f3-image.png

    If you escape the quotes when inside brackets, they will not be recognized as embedded quotes anymore:
    8ec9e14d-4e2d-48fe-848b-4b5bf5931cd6-image.png

    So I believe these are the kinds of setups you will want. Defining the regex wrappers as delimiters as well should go a long way to giving you what you want, I think.

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

    6
    0 Votes
    6 Posts
    748 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.

  • PythonScript detect saved/unsaved file state at startup

    8
    0 Votes
    8 Posts
    1k Views
    Alan KilbornA

    After long delay, I made an official Notepad++ issue out of this:

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

    In the issue, I switched to using NppExec to reproduce, rather than PythonScript, lest it be interpreted as a PS bug and not a N++ bug.

  • How to disable FindHistory and FileEditViewHistory? auto-clear at exit?

    15
    0 Votes
    15 Posts
    2k Views
    Alan KilbornA

    @MarkusBodensee said:

    Highlight the entry in the dropdown and press Del to delete.

    To extend this idea, drop down the combobox, then press and hold Del (aka Delete) to remove all entries (ask the key repeats).

  • Fullscreen - X icon to close isn't enought on top right corner

    2
    0 Votes
    2 Posts
    284 Views
    Alan KilbornA

    @Andrea-Astolfi-0

    Didn’t you already say this, HERE ?

    This is a long-known issue; I could be wrong but I believe the reason it hasn’t been fixed is that it is related to other problems Notepad++ has with “high dpi” screens…

    If you’d like, you can find the issue in the official Notepad++ issue list, start HERE, and add a comment (to the existing issue) in the form of an “I noticed this too and would like it fixed”.

  • posting code (by copy & paste) with line numbers

    18
    0 Votes
    18 Posts
    3k Views
    Lycan ThropeL

    @PeterJones said in posting code (by copy & paste) with line numbers:

    @Lycan-Thrope ,

    If it’s automatically picking the D language, have you looked at Settings > Preferences > New Document > Default Language – does it say D instead of None (Normal Text)? If so, change that preference back, and it will go back to defaulting to normal text. (That setting cannot be affected by UDL, so I don’t see how your dBASE UDLs could be doing anything to influence it…)

    @PeterJones ,
    Thanks, this was the cause.
    Now that I think back, I think I was doing a help in the forum and used that to show the language setting and take screenshots…and forgot to put it back. DOH!!
    Back to normal…thanks for curing my forgetfulness. :-)

  • 0 Votes
    7 Posts
    1k 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.

  • Bold font style change on Linux Mint

    12
    0 Votes
    12 Posts
    2k 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.

  • On install regsvr32 has stopped working

    2
    0 Votes
    2 Posts
    342 Views
    xomxX

    @C-Bacca said in On install regsvr32 has stopped working:

    On windows Server 2013

    Do you mean Windows Server 2012 R2 (Windows 8.1 based)?

    (I can try to test the same in a VM but has to be sure which Windows…)

    @C-Bacca said in On install regsvr32 has stopped working:

    I have limited permissions to install on this dev machine so I installed

    From your error messages is clear that there is a problem with registering the Notepad++ context menu shell extension (NppShell). Since only “system-wide” registration (which in turn needs the admin-rights anyway) is currently supported for NppShell, I would simply choose to install without this shell extension during installation:
    npp-installer-no-NppShell.png

    Other workaround is to use a portable N++ version instead, e.g. here is the link to the latest v8.8 (x64): https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.8/npp.8.8.portable.x64.zip

    Just unzip that to your writable folder of choice and run there the Notepad++.exe. And portable N++ versions do not contain the NppShell at all, so no similar regsvr32 problem is possible…

  • How do I sort strings separated by commas?

    5
    0 Votes
    5 Posts
    615 Views
    Alan KilbornA

    @C-Bacca said in How do I sort strings separated by commas?:

    is there a way to make this a series of steps, like a macro,

    Yes, you should be able to record it and save it as a macro.
    Note that Step 1 would not be part of the macro, but would be something that you have to do before running the macro.
    For more on macros see HERE.

  • Is the shortcut mapper dialog box broken?

    9
    1 Votes
    9 Posts
    2k Views
    mkupperM

    @PeterJones said in Is the shortcut mapper dialog box broken?:

    Could you download the appropriate artifact for your installed Notepad++, and see if this build fixes it for you?

    I’m now using both the MSVC.x64.Release and MSVC.Win32.Release Notepad++.exe files. The shortcut mapper issue has been fixed. Thank you @PeterJones

  • Grouping tabs and group renaming.

    4
    0 Votes
    4 Posts
    524 Views
  • need help to look for a word

    10
    0 Votes
    10 Posts
    1k Views
    PeterJonesP

    @dr-ramaanand said in need help to look for a word:

    simply because it is easier

    That’s apparently a matter of opinion. To me, negative lookbehind, where it’s telling you “look behind the current position, and make sure it’s not XYZ” is a lot easier to read/understand than “match something, then say, wait no, I don’t actually want to match that, let’s fail this whole path and move on to the alternation”. (And, from what I can tell, that’s not really a good explanation of skip+fail, because it takes our regex guru pages of text to explain it, whereas I can successfully convey the meaning of a negative lookbehind in one sentence.)

    Since your first version of the skip+fail post was wrong, and you couldn’t tell this immediately, even after it was pointed out to you that it was wrong, I am not convinced that it’s truly as “simple” – even for you – as you are implying.

    I am going to stick with recommending solutions that i could explain if necessary; I will only personally link to the skip+fail formula if I know of no other way to do something (and I wouldn’t tell anyone it’s “simple”)

    But if it truly makes more sense to you than a negative lookbehind, that’s great for you; everyone is different.

  • Cannot select bold character in replace in files

    8
    0 Votes
    8 Posts
    822 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.

  • Negative lookbehind regular expression not working on Notepad++

    43
    0 Votes
    43 Posts
    9k Views
    dr ramaanandD

    @guy038 Oui, merci beaucoup!

  • Find 'Not Found' Matches in list

    6
    0 Votes
    6 Posts
    802 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