• Header plugin

    4
    0 Votes
    4 Posts
    521 Views
    Aleksandr ShchepkinA

    Friends, you’ve helped me so much, I’m so happy. I have a txt file with more than 16000 lines, size 1,6 mb. I created an xml file in the functionList folder with the following code:
    <NotepadPlus>
    <functionList>
    <parser displayName=“XML” id=“xml”>
    <function
    mainExpr=“#([^#<]+)”
    displayMode=“$functionName”>
    </function>
    </parser>
    </functionList>
    </NotepadPlus>

    And indeed now, I have a set of headers displayed on the right (the headers start with the # symbol).
    The file is constantly growing, so far everything is working very well, thanks.

  • I can't save it... help me plz...

    2
    0 Votes
    2 Posts
    191 Views
    PeterJonesP

    @parkyungmin ,

    Sorry. I could not reproduce it. “Save” and “Save As” work for me.

    ----

    Why such a short reply? Because you didn’t tell us enough to be able to reproduce your problem, or because I tried what you described and got the results I expected. If you give us more information, we might be able to help more. Especially important are the ? menu’s Debug Info contents, a thorough description of the steps necessary to reproduce your problem.

  • Forced font antialiasing and Courier is not what it should be

    8
    0 Votes
    8 Posts
    571 Views
    Jean-Claude ArbautJ

    @Alan-Kilborn

    Actually, as long as the option is still there it’s fine. But it was surprising, as there is also an antialiasing option in the Editing pane, so I didn’t expect another option to cover this (and I rarely look at the Misc pane anyway).

    I guess whatever the enhancement, there will always be someone who doesn’t like it. ;-) I have myopia, and I see blurry enough, so I like my screen characters to be as sharp as possible. While it may not be a common concern, I’m sure I have seen folks with the same preference on the Internet from time to time, as my antialiasing problem is not new nor limited to Npp - Windows and other programs have not always been reliable for this either. Even on Linux, I tend to prefer xterm over the more modern terminals for the same reason. I’m in the anti-antialiasing team!

    Many thanks to all,

    JCA

  • Why does this regexp fail to match?

    8
    0 Votes
    8 Posts
    401 Views
    mkupperM

    @Alan-Kilborn said in Why does this regexp fail to match?:

    It’s so contrived it makes my head hurt. :-P
    I suspect this is the non-contrived version (which feels much better):

    I agree on the hurt, or at least spinning, head. In hindsight, I should have used ^date\K time which both works and is easier to mentally parse.

    I now understand why my first expression failed in the original message on this thread.

    FWIW, while parsing @Coises’ reply I found https://www.regular-expressions.info/lookaround.html via Google that has a decent explanation on why many regexp engines require fixed length or width lookbehinds. Some engines have ways around this restriction but each of those seems to create their own cans of worms.

    For now I’ll stick with lookbehinds only as the first thing in an expression or use \K as I now see that if I have a lookbehind later in an expression, even after a zero length ^ match, that it can be a brain twister to figure out what is happening.

    Here’s a simplified version of the contrived data and regexp that is easier to understand. The data is

    abc

    Searching using any of these get you the same results:

    (?<=a)bc b(?<=ab)c bc(?<=abc)

    The latter two end up inspecting the b or bc in the data twice.

  • 0 Votes
    4 Posts
    639 Views
    Gary HessG

    Sorry, I figured it out. “Wrap around” wasn’t checked.

  • After using Compare, how do you save differences?

    3
    0 Votes
    3 Posts
    5k Views
    Jacqueline van der WalJ

    @pnedev Thank you very much, I will try this! This is my work laptop on which I don’t have admin rights, so I will need to have someone install this for me. Thanks a lot!

  • How can I go to a specific column?

    15
    0 Votes
    15 Posts
    7k Views
    Alan KilbornA

    I’m starting to think that the notion of a “column” number value is a ridiculous concept. :-)

    Moving away from regular expressions, here’s a PythonScript for experimentation, that will prompt you for a column number to move the caret to on the current line.

    # -*- coding: utf-8 -*- from __future__ import print_function # references: # https://community.notepad-plus-plus.org/topic/25579/how-can-i-go-to-a-specific-column # for newbie info on PythonScripts, see https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript from Npp import * current_line = editor.lineFromPosition(editor.getCurrentPos()) max_column = editor.getColumn(editor.getLineEndPosition(current_line)) while True: if max_column == 0: notepad.messageBox('Current line is empty (has no columns)', '') break user_input = notepad.prompt('Enter column (1 - {mc}) to move caret to (on current line):'.format(mc=max_column+1), '', '') if user_input is None: break try: desired_column = int(user_input) - 1 if not (0 <= desired_column <= max_column): raise ValueError except ValueError: continue pos_of_desired_col = editor.findColumn(current_line, desired_column) gc = editor.getColumn(pos_of_desired_col) if desired_column > gc: notepad.messageBox('desired column ({dc}) is greater than existing column ({gc}) on current line; moving to column {gc}'.format( dc=desired_column+1, gc=gc+1), '') editor.setSel(pos_of_desired_col, pos_of_desired_col) break

    Note that this does NOT implement any of the grand ideas I had EARLIER for a well-rounded-out “goto line/col” feature (maybe a script for that comes later if we can find a way beyond “weird” column results with some of the stranger unicode characters…).

  • search list values in 50+ files

    4
    0 Votes
    4 Posts
    500 Views
    Alan KilbornA

    @mkupper said in search list values in 50+ files:

    I normally do that from the command line. Notepad++'s search can’t use a list of thousands of values.

    You should have stopped after those 2 sentences.
    Please don’t present detailed non-Notepad++ solutions to questions posed on this site.
    This site is for discussion of Notepad++ related topics, only.

    If you feel like you want to suggest a non-Notepad++ solution to something, perhaps the best reply is suggesting some keywords for an internet search the poster could do to arrive at some help.

  • clear and close Search Results

    7
    0 Votes
    7 Posts
    473 Views
    TBugReporterT

    @Alan-Kilborn said in clear and close Search Results:

    by “confused” you mean that when running the script from one instance, that it might close a different instance’s Search results. […]

    In my understanding, there is nothing that prevents this from finding the “wrong” instance window

    My concern exactly, but as I said, experimentation hasn’t caused this to occur for me yet.

    I’ve never undocked the panel; I don’t even know how to do that.

    If you double-click either of these areas

    Thank you for the extra effort, but I didn’t mean that comment as a question. I saw that info at the manual site, but the only time I expect to use it is if I do this by mistake - to get things back to normal.

  • 0 Votes
    5 Posts
    446 Views
    Alan KilbornA

    @litos81 said in In normal text file, ... and === and <<< are displayed oddly. How to disable?:

    Probably what you were seeing was the ligature (where certain chain of characters are joined in one) support from that font.

    For readers unfamiliar with “ligatures”, in simple terms it is a visual transmuting of adjacent characters.

    Here are some examples, from typical programming languages:

    test for equality: without ligature support it would appear ==; with support it looks like this:
    cd9c8b92-3a60-4f25-ad63-f51743752655-image.png

    test for inequality: without ligature support it would appear !=; with support it looks like this:
    199bf85b-c607-4b93-b6d2-f8a068e069af-image.png

    if you put three equal signs together (===), you can get this:
    e96f3f13-bd02-47f1-a9a0-b9ede337ccff-image.png

    All the examples I’ve shown use the equal sign in them, but ligatures go way beyond that (using other character combinations).

  • Secondary carets not visible with dark theme

    12
    1 Votes
    12 Posts
    996 Views
    rdipardoR

    @JTB-Ben_Sync said in Secondary carets not visible with dark theme:

    Is it possible for this to be added into notepad++ fresh install?

    As a matter of fact, it was added to all the standard-issue themes in time for the “Anniversary Edition” (8.6.0) last November.

    Have a look at this related GitHub issue and consult the user’s manual on how to completely refresh your user configs after a feature upgrade.

  • put search result right in the middle of screen

    15
    0 Votes
    15 Posts
    2k Views
    Auryn MeA

    I got progress :)
    I found a JSON Formatter / Validator that formatted that mess from above to this:
    0c957bdb-81df-457e-8f99-4689fedeafd2-image.png
    Look much more easy to work with, the game accepts it and i can use Notepad++ :)

  • Why cant i go over <H6> when doing headings?

    3
    0 Votes
    3 Posts
    173 Views
    _erinaa__

    @PeterJones Thanks a lot!!

  • Disable menu activation for a shortcut.

    18
    0 Votes
    18 Posts
    5k Views
    notdodgeballN

    Continuing the trend of the user is actually the problem, I have several custom Alt+something shortcuts and the menu bar options don’t interfere with them at all.

    It gets better, if I let go of the Alt key and then press the letter I can still use the menu bar shortcuts normally, as if I had pressed the F10 key to bring the focus to the menu bar, which would be my fallback option anyway.

  • COBOL syntax and wrap strings

    4
    0 Votes
    4 Posts
    432 Views
    R

    @Alan-Kilborn

    Thank you. I did add the request on the Scintilla site.

  • 0 Votes
    3 Posts
    422 Views
    menbead1M

    @rdipardo thank you, deleting langs.xml as well as stylers.xml fixed the issue! thank you so much!

  • 0 Votes
    6 Posts
    710 Views
    Alan KilbornA

    @Lycan-Thrope said in does anyone know a alternative for a chromebook that works like Notepad ++:

    responding to a 4 year old post

    This is okay, as long as you’ve got something valuable to say.

  • Find parent tag's id if that parent tag has specific tags inside it

    31
    0 Votes
    31 Posts
    5k Views
    ThosRTannerT

    See also the faq about not using regexs to parse xml documents.

  • Scroll bar colour please

    3
    0 Votes
    3 Posts
    299 Views
    James ThompsonJ

    @rdipardo Thanks for a detailed reply. I thought that might be the case.
    Having looked at it more closely, (lets call it the thumb, though I really like pea too!) - The thumb goes a little brighter when the mouse is over it, and it goes even more brighter when the thumb is grabbed. I wonder if the control can be customised in a future version, just to make it brighter before it is clicked. On a very large file, the thumb becomes very small, and I think the issue for me is that the default thumb colour is the same as the main text background. If the room is bright (with natural light, which I know is unusual for a programmer), then it can be hard to see it. But I would stress this is a minor issue and over all the product is fantastic.

    I suppose a work around for now, is to try to find it with the mouse, now I know that it will go brighter when the mouse is over it. Also of course, holding down the LMB on the scroll bar, will eventually bring the thumb under the mouse. Thanks again.

  • regexp to match comma(s) end of line

    18
    0 Votes
    18 Posts
    5k Views
    guy038G

    Hello, @patrickdrd,

    In a pevious post, you said :

    anyway, I’m posting one of my such files to take a look yourselves if and whoever has some time, thanks!

    https://pastebin.com/raw/rFi6heCt

    So, I downloaded your file and, after studying it two days, I’m happy to email you back both the original file and the new one, with my formatting :-))

    I succeeded to transform all your data in 9 tables, described below :

    •----------•---------•---------• | Fields | Width | Lines | •----------•---------•---------• | 10 | 9,849 | 466 | | 4 | 146 | 43 | | 19 | 1,565 | 216 | | 2 | 154 | 15 | | 12 | 9,008 | 169 | | 12 | 5,992 | 89 | | 9 | 8,346 | 21 | | 9 | 226 | 39 | | 7 | 381 | 487 | •----------•---------•---------•

    REMARK : Just one record is still odd. You can get this record by searching the regex \x{203D}{3}

    I also rename this OUTPUT text file as an Lua file, in order to get a general folding, which does not interfere with your file contents !

    Finally, I verified that the number of chars ( 339,792 ) is identical between your original file Patrick_BEFORE.txt and the transformed file Patrick_AFTER.lua, with the regex (?![,| \[\]•\x{203D}\r\n-])[\x{0000}-\x{D7FF}\x{E000}-\x{FFFF}], which covers all the BMP Unicode plane, except for the 10 characters below :

    , | \x20 [ ] • ‽ \r \n -

    I do hope that my work will be benefic to you, in some way !

    Best Regards,

    guy038