• How can I go to a specific column?

    15
    0 Votes
    15 Posts
    11k 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
    689 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
    601 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
    529 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
    1k 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
    222 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
    685 Views
    R

    @Alan-Kilborn

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

  • 0 Votes
    3 Posts
    507 Views
    menbead1M

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

  • 0 Votes
    6 Posts
    757 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
    8k Views
    ThosRTannerT

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

  • Scroll bar colour please

    3
    0 Votes
    3 Posts
    368 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
    7k 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

  • Same action on the (same) highlighted sections

    10
    0 Votes
    10 Posts
    488 Views
    Alan KilbornA

    @Andi-Kiissel said in Same action on the (same) highlighted sections:

    So Ctrl+Shift+… and Shift+Ctrl+… different behaviour would be acceptable too…
    Sorry, not for me.

    Sorry, don’t know what you mean.

  • How to define a default "Save as...." directory?

    7
    0 Votes
    7 Posts
    2k Views
    D

    @Claudia-Svenson This seems to be exactly I want.

    Hey did you follow up and create the feature request? Or did you find any workaround?

  • there is data left after the program was uninstalled

    4
    0 Votes
    4 Posts
    475 Views
    Jane MischenkoJ

    Debug Info! Debug info is what I needed! It was installed for some reason in program files/npp/ …
    Why here… ) But well, the main thing is that I finally found where the launch came from and now I know how to search. Thanks!

  • Remove line breaks on lines ending with commas

    3
    0 Votes
    3 Posts
    4k Views
    Dennis PayallD

    Thanks!! Two years too late! - I have struggled with this for the past years - I just hadnt seen your answer… Thanks Again!!

  • Unicode characters as delimiters in UDL

    3
    0 Votes
    3 Posts
    358 Views
    MarionM

    @PeterJones This is perfect – thank you so much for your help!

  • 0 Votes
    16 Posts
    5k Views
    notdodgeballN

    @PeterJones Much appreciated

    A few links for better understanding or future reference in the event or of a dev wanting to take a chance.

    https://w3c.github.io/uievents-code/
    https://jsfiddle.net/v1gz5c5m/1/
    https://github.com/Microsoft/node-native-keymap