• User Defined Language: Collapse block of text

    4
    0 Votes
    4 Posts
    3k Views
    PeterJonesP

    @CoR said in User Defined Language: Collapse block of text:

    So, choices are:
    not possible

    natively, correct, it is not currently possible

    plugin (if it is possible to do it in plugin way)

    that would work. plugins can be used to define whole new lexers in the language menu, so yes, a plugin could handle what you wanted, if such a plugin were to be written (I doubt one with that exact feature is already in the Plugins Admin list of plugins).

    With some effort, it could probably also be implemented using the already-existing PythonScript or LuaScript plugin, which allow you to write Python or Lua code to control the Notepad++ GUI and editor windows, including influencing things like syntax highlighting and code folding. My guess is that it would use a similar technique to what @Ekopalypse implemented for regex-based extra-syntax highlighting in this post, but you’d have to find the code-folding rather than text-coloring code to manipulate.

    a feature request

    You could try, yes. However, no new features have been added to User Defined Languages (UDL) system in years, and there are many open bug reports and feature requests for UDL improvements … Sorry that I don’t have better news on that front. :-(

    :(

    Indeed.

  • hello,i am new and have a very stupid question.

    3
    0 Votes
    3 Posts
    240 Views
    anastasiia maiorovaA

    @Ekopalypse oh thank you! i solved it now!! thanks alot :)

  • How to remove the space when commenting lines?

    11
    0 Votes
    11 Posts
    1k Views
    WillyW

    @Terry-R These are valid options and I did think of them, but I was hoping there was a way to configure notepad++ without doing anything, I’ll try my luck on Github and thanks for everything.

  • Will not open files on mounted ntfs partition

    3
    0 Votes
    3 Posts
    616 Views
    Alan KilbornA

    Often the argument is “It works just fine in all my other applications, just not Notepad++”.
    So at what point does NOT supporting a certain scenario become a liability?
    Perhaps even one that makes users switch to other text-editing software.
    There’s no answer – it’s a tough call.

  • Range Replace - Regular Expression

    5
    0 Votes
    5 Posts
    1k Views
    Alan KilbornA

    @guy038

    Good technique.

    Slight mod:
    The OP mentioned the top end being 150, so the selection should probably really be:

    412f6922-e2a5-4098-912a-5a015e2ac03e-image.png

    But, if the OP couldn’t extrapolate your solution to that, there’s a bigger problem. :-)

  • Macro for "Number to Insert" from Column Editor

    5
    0 Votes
    5 Posts
    375 Views
    Alan KilbornA

    @Gustavo-Baiano said in Macro for "Number to Insert" from Column Editor:

    I just want to have a “enumerate shortcut”.

    It seems like it would be an easy thing to write a script for, either in Pythonscript or Luascript

    You would:

    define a column insert region (what would look like a tall caret

    run the script (via keycombo, menu, or toolbar button)

    boom your numbering pops in! :-)

    But, do you do this constantly, such that using the actual column editor is a real burden?

  • Replace specific number and letter

    3
    0 Votes
    3 Posts
    205 Views
    Alexandros XatzidimitriouA

    Thanks a lot guy038! This is exactly what I was looking for!!!

  • Lag spikes/freezes when using multiline String in ps1 file

    2
    0 Votes
    2 Posts
    548 Views
    PeterJonesP

    @Kevin-Holtkamp said in Lag spikes/freezes when using multiline String in ps1 file:

    @"
    string content
    "@

    With a powershell file with just that content, I don’t notice any lag / freezes. My guess is something else is going on.

    Please go to the ? menu, select Debug Info, and paste the results into the forum.

    Also, see if it freezes for you when all you have in your powershell file is

    @" string content "@

    If it does freeze from just that, let us know. If not, there is going to have to be more debug.

    My guess is something else is going on: either it’s because of a really long file, or because of one or more plugins, or both. (There could also be many things I haven’t considered.)

  • Font of this text

    9
    0 Votes
    9 Posts
    5k Views
    PeterJonesP

    @overstop said in Font of this text:

    I like the font of this website and font of the posts, so I was curious.

    Ah. Sorry. This forum is specifically about Notepad++, the text editor. So we naturally assumed you were asking about Notepad++ fonts, not the fonts of this website.

    You would have to look at your browser settings, as well as the underlying CSS styling, to know for sure. Some browsers (like Chrome) have ways to find out what the actual chosen font/family is, after all stylesheets have been applied.

    A quick look at the css shows that normal text uses

    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";

    CSS will search for those fonts on your system, in the order listed.

    and code/fixed-width text uses

    font-family:Menlo,Monaco,Consolas,"Courier New",monospace;

    My guess, if you’re browsing on Windows and your browser isn’t set to override CSS-based font, is that you are seeing Segoe UI for normal text and Consolas for fixed width text.

  • Replace text with incremented counter?

    9
    0 Votes
    9 Posts
    16k Views
    Alan KilbornA

    @Rupert-Russell

    Starting to wonder if this isn’t spam for TextPad as you posted virtually the same thing in THIS THREAD that has an extremely similar title.

    If it is NOT spam, then what is the point of posting it here?

  • "Search" / "Find" pane

    5
    0 Votes
    5 Posts
    454 Views
    Alan KilbornA

    @asvc said:

    check this topic: … (you might want to read starting at the last post)

    “last post” has no reasonable meaning if new “last posts” have been added since you typed that. :-)

    You can link to a specific posting in a topic by right-clicking on the posting time and copying the link address and then pasting that.

    So for example, a posting might say “asvc about 2 hours ago”. Right-click on the “about 2 hours ago” part and copy that link.

  • Regex searching for NUL characters

    5
    2 Votes
    5 Posts
    4k Views
    guy038G

    Hi, @alan-kilborn and All,

    Here is a solution, as a work-around, to manage the presence of the NUL character(s) in a file :

    Choose an other character, not used, yet, in your file. Let’s take the \x{007F} control character Delete

    So, you first run the regex S/R, below, with the Wrap around option and the Regular expression search mode

    SEARCH \0

    REPLACE \x7F

    Then you perform all your text manipulations, in Notepad++

    Finally, save your file and exit N++

    As we cannot insert any NUL character, with an N++ replacement, we’ll simply use the well known utility sed.exe

    You can download its last Windows v4.8 - 64 bits version, from https://github.com/mbuilov/sed-windows

    Or other versions, from https://github.com/mbuilov/sed-windows/tree/master/archive

    Then, in a DOS console window, type in and execute this simple command :

    sed.exe -i s/\x7f/\x00/ Your_File

    Best Regards,

    guy038

  • Find and Insert rather Replace

    3
    0 Votes
    3 Posts
    2k Views
    Alan KilbornA

    Another technique is to use \K at the end of your find string.
    In that usage you then do not use ${0} in the replace.
    Your replacement string will be inserted at the end of the text your find string matches.
    I mention this usage because that seems to be what you are needing.

    However, if you ever have a situation where you want your find string text to be in the middle of a replacement, then the ${0} usage is the solution.

  • [FunctionList] Regex OK in Regex101 but broken in N++

    11
    1 Votes
    11 Posts
    1k Views
    Mateos81M

    It’s a montage made by a contributor to show me what he’d like to have, and since that was exactly what I wanted myself, I took the picture and forwarded it over here ^^’

    You can see there’s a gray line hanging kind-of off, but still I’ve asked him to be sure, and yes it was a montage (else he’d have pushed his script to the repo I guess)

    Thanks for the clarifications @MAPJe71 :)

    So we can’t push more forward for now; thank you very much to all of you following and helping on this topic!

    Take care people

  • 2 Votes
    1 Posts
    140 Views
    No one has replied
  • Make Regex for anti swear

    2
    0 Votes
    2 Posts
    305 Views
    Alan KilbornA

    @Fabio-grossi

    Regex isn’t going to be able to help you with this task.

  • Delete with Replace mode!

    3
    0 Votes
    3 Posts
    273 Views
    cmeriauxC

    sorry @guy038 I stole the regex star from you ;-)

  • Filter the data !!!

    63
    0 Votes
    63 Posts
    16k Views
    EkopalypseE

    @guy038

    This is how it looks on your system, but I assume it might look different on a system where OSMANYA is more common.
    That is, of course, if there is a localized version of Windows that OSMANYA takes into account.

  • find group of machting characters

    3
    0 Votes
    3 Posts
    262 Views
    Alan KilbornA

    @bowoo-king said in find group of machting characters:

    duplication of a group of 8 characters in a string

    The example showed digits so that’s what my solution was tailored to.
    But…
    If it is truly “characters” then this might be more appropriate:
    (?-s)(.{8}).*?\1

  • Supported versions of Notepad++

    2
    0 Votes
    2 Posts
    238 Views
    Alan KilbornA

    @Mary-Lou-Sullivan

    Typically the reality of how it goes is you ask a specific question about what you think is a defect.
    You can do this in about any version you like.
    Probably someone will try out your suspected bug in whatever version they have, in all likelihood a later version than yours.
    If they do not experience the same problem you did, their advice might be for you to upgrade to a newer version and try again.

    If you’re asking if there are dedicate teams supporting each of version 7.1.x, 7.2.x, etc. (or something like that) and then fixing bugs in these specific versions for release as later 7.1.y, etc, then the answer is NO.